mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2025-07-05 11:33:12 +08:00
feat: add locale
This commit is contained in:
9
.vitepress/config/en-US/index.ts
Normal file
9
.vitepress/config/en-US/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import type { DefaultTheme } from 'vitepress'
|
||||
import { getNav } from './nav'
|
||||
import { getSidebar } from './sidebar'
|
||||
|
||||
export default (): DefaultTheme.Config => ({
|
||||
nav: getNav(),
|
||||
sidebar: getSidebar(),
|
||||
i18nRouting: true
|
||||
})
|
10
.vitepress/config/en-US/nav.ts
Normal file
10
.vitepress/config/en-US/nav.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import type { DefaultTheme } from 'vitepress'
|
||||
|
||||
export const getNav = (): DefaultTheme.NavItem[] => {
|
||||
return [
|
||||
{
|
||||
text: 'Components',
|
||||
link: '/components/'
|
||||
}
|
||||
]
|
||||
}
|
18
.vitepress/config/en-US/sidebar.ts
Normal file
18
.vitepress/config/en-US/sidebar.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import type { DefaultTheme } from 'vitepress'
|
||||
|
||||
const componentsDir = `/components/`
|
||||
|
||||
export const getSidebar = (): DefaultTheme.Sidebar => {
|
||||
return {
|
||||
'/components/': [
|
||||
{
|
||||
text: 'Button',
|
||||
link: `${componentsDir}button/`
|
||||
},
|
||||
{
|
||||
text: 'ConfigProvider',
|
||||
link: `${componentsDir}config-provider/`
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user