diff --git a/.gitignore b/.gitignore index a642011..cc39a1d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ es lib ~ pnpm-lock.yaml + +docs/.vitepress/cache \ No newline at end of file diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.mts similarity index 62% rename from docs/.vitepress/config.ts rename to docs/.vitepress/config.mts index a1d884b..6d7ebe0 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.mts @@ -4,18 +4,19 @@ export default defineConfig({ lang: 'en-US', title: 'treemate', locales: { - '/': { + root: { + label: 'English', lang: 'en-US', - title: 'treemate', - description: 'Manipulating tree data structure for user interface' }, - '/zh/': { + zh: { + label: '简体中文', lang: 'zh-CN', - title: 'treemate', - description: 'Manipulating tree data structure for user interface' }, }, themeConfig: { + search:{ + provider:'local', + }, sidebar:{ 'zh':[ { @@ -34,13 +35,6 @@ export default defineConfig({ } ] }, - localeLinks: { - text: '', - items: [ - { text: 'English', link: '/guide' }, - { text: '简体中文', link: '/zh/guide' }, - ], - }, socialLinks: [ { icon: 'github', link: 'https://github.com/07akioni/treemate' }, ], diff --git a/docs/zh/index.md b/docs/zh/index.md new file mode 100644 index 0000000..c59de7b --- /dev/null +++ b/docs/zh/index.md @@ -0,0 +1,15 @@ +--- +layout: home + +title: treemate +hero: + name: treemate + text: manipulating tree data structure for user interface + actions: + - theme: brand + text: 快速上手 + link: /guide + - theme: alt + text: 查看 GitHub + link: https://github.com/07akioni/treemate +--- \ No newline at end of file diff --git a/package.json b/package.json index 7a52dfb..4f24291 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "husky": "^5.1.1", "prettier": "2.5.1", "typescript": "^4.0.3", - "vitepress": "1.0.0-alpha.4", + "vitepress": "1.0.1", "vitest": "^0.20.3" }, "scripts": {