Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: docs search and i18n config #219

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ es
lib
~
pnpm-lock.yaml

docs/.vitepress/cache
20 changes: 7 additions & 13 deletions docs/.vitepress/config.ts → docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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':[
{
Expand All @@ -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' },
],
Expand Down
15 changes: 15 additions & 0 deletions docs/zh/index.md
Original file line number Diff line number Diff line change
@@ -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
---
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading