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

Zh #3

Closed
wants to merge 105 commits into from
Closed

Zh #3

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
5385bea
docs(zh): add index.md for zh-CN
awxiaoxian2020 Nov 8, 2022
f95361e
docs(zh): update `guide` translation
awxiaoxian2020 Nov 9, 2022
422aba0
docs(zh): update the `config` translation
awxiaoxian2020 Jan 1, 2023
6f77cf5
Merge branch 'main' into zh
awxiaoxian2020 Jan 17, 2023
e24d5db
docs(zh): add i18n docs
awxiaoxian2020 Jan 18, 2023
a65c517
Merge branch 'main' into zh
awxiaoxian2020 Jan 18, 2023
89410cc
feat: support i18n for vitepress docs
awxiaoxian2020 Jan 18, 2023
b7df52e
fix typos
awxiaoxian2020 Jan 18, 2023
d912b88
sync with https://github.com/vuejs/vitepress/commit/75d7d0084b25b4a29…
awxiaoxian2020 Jan 18, 2023
745d739
Merge branch 'main' into zh
awxiaoxian2020 Jan 20, 2023
8896a37
Merge branch 'main' into zh
awxiaoxian2020 Jan 23, 2023
f6e6ac6
sync with https://github.com/vuejs/vitepress/commit/fe52fa34201dcfa87…
awxiaoxian2020 Jan 23, 2023
73e7a98
docs(zh): update `outline.level`
awxiaoxian2020 Jan 23, 2023
323f603
docs(zh): update some strings
awxiaoxian2020 Jan 23, 2023
b8450de
Merge branch 'main' into zh
awxiaoxian2020 Jan 25, 2023
b7e86c3
Merge branch 'main' into zh
awxiaoxian2020 Jan 29, 2023
d5ff41c
Merge branch 'main' into zh
awxiaoxian2020 Feb 1, 2023
2d99f46
sync
awxiaoxian2020 Feb 1, 2023
ba6cacf
Merge branch 'main' into zh
awxiaoxian2020 Feb 6, 2023
8c23c0e
Merge branch 'main' into zh
awxiaoxian2020 Feb 17, 2023
80c588e
Merge branch 'main' into zh
awxiaoxian2020 Feb 28, 2023
9ff2125
sync
awxiaoxian2020 Feb 28, 2023
b789e4e
sync
awxiaoxian2020 Feb 28, 2023
40ad8d0
sync
awxiaoxian2020 Feb 28, 2023
1a43e40
Merge branch 'main' into zh
awxiaoxian2020 Feb 28, 2023
a4ed7f2
Merge branch 'main' into zh
awxiaoxian2020 Mar 1, 2023
911718a
update
awxiaoxian2020 Mar 1, 2023
66c93c9
Merge branch 'zh' of https://github.com/awxiaoxian2020/vitepress into zh
awxiaoxian2020 Mar 1, 2023
1a4838b
Merge branch 'main' into zh
awxiaoxian2020 Mar 1, 2023
442348d
sync
awxiaoxian2020 Mar 1, 2023
1df02c9
fix sidebar
awxiaoxian2020 Mar 1, 2023
88f8e11
update
awxiaoxian2020 Mar 1, 2023
3752f43
update
awxiaoxian2020 Mar 1, 2023
e76938f
sync
awxiaoxian2020 Mar 1, 2023
4ee0381
Merge branch 'main' into zh
awxiaoxian2020 Mar 3, 2023
3dbbd80
Merge branch 'main' into zh
awxiaoxian2020 Mar 8, 2023
8227cde
prepare new translation
awxiaoxian2020 Mar 9, 2023
de2264f
Merge branch 'main' into zh
awxiaoxian2020 Mar 9, 2023
5e3f907
update and fix ci
awxiaoxian2020 Mar 9, 2023
6bbf084
update sidebar
awxiaoxian2020 Mar 9, 2023
20e7df2
sync
awxiaoxian2020 Mar 16, 2023
a4f097e
Merge branch 'main' into zh
awxiaoxian2020 Mar 16, 2023
7d10276
sync
awxiaoxian2020 Mar 16, 2023
8a2ac4a
sync
awxiaoxian2020 Mar 16, 2023
6547b5b
update headings
awxiaoxian2020 Mar 16, 2023
91cacc4
remove some anchors to fix ci
awxiaoxian2020 Mar 16, 2023
1adfdd2
fix ci
awxiaoxian2020 Mar 16, 2023
58740c8
remove anchor
awxiaoxian2020 Mar 16, 2023
62be3a3
update
awxiaoxian2020 Mar 16, 2023
cfdd3e0
update
awxiaoxian2020 Mar 17, 2023
0c66f16
Merge branch 'main' into zh
awxiaoxian2020 Mar 23, 2023
58aa8f1
Merge branch 'vuejs:main' into zh
awxiaoxian2020 Mar 23, 2023
1f9c948
update
shellRaining Mar 23, 2023
2309763
update
shellRaining Mar 24, 2023
57cae60
update
shellRaining Mar 24, 2023
376b162
update
shellRaining Mar 24, 2023
14303ae
update
shellRaining Mar 24, 2023
c169d63
update
shellRaining Mar 25, 2023
a2fdb22
update
shellRaining Mar 26, 2023
0841db9
update
shellRaining Mar 26, 2023
ee349a5
update
shellRaining Mar 26, 2023
ee1e024
format
shellRaining Mar 26, 2023
84c2cb5
fix link error
shellRaining Mar 26, 2023
002effe
Merge branch 'vuejs:main' into zh
shellRaining Mar 26, 2023
0b648e9
update
shellRaining Mar 26, 2023
320f969
fix
shellRaining Mar 27, 2023
2750953
update
shellRaining Mar 27, 2023
3c122c2
remove anchors [skip ci]
awxiaoxian2020 Mar 27, 2023
66b32b2
fix typos [skip ci]
awxiaoxian2020 Mar 27, 2023
ba31337
Merge branch 'zh' of github.com:awxiaoxian2020/vitepress into zh
shellRaining Mar 31, 2023
cca32cb
update
shellRaining Mar 31, 2023
2ee3238
update
shellRaining Mar 31, 2023
e586b6c
update
shellRaining Mar 31, 2023
9a0e13e
fix link typo
shellRaining Mar 31, 2023
dd9f051
Merge branch 'main' into zh
awxiaoxian2020 Apr 7, 2023
63ec5ae
Merge branch 'main' into zh
awxiaoxian2020 May 15, 2023
baf53c4
update
awxiaoxian2020 May 15, 2023
77444d1
update from @vanchKong
awxiaoxian2020 May 15, 2023
bf4b8c8
update
awxiaoxian2020 May 15, 2023
cbbae86
custom doc footer
awxiaoxian2020 May 15, 2023
1d224c0
Merge branch 'main' into zh
awxiaoxian2020 May 23, 2023
fe86886
update
awxiaoxian2020 May 26, 2023
d289968
Merge branch 'main' into zh
awxiaoxian2020 Jun 21, 2023
8b6fd53
Merge branch 'main' into zh
awxiaoxian2020 Jun 28, 2023
f3eb1a8
format
awxiaoxian2020 Jul 2, 2023
f75e333
Merge branch 'zh' of https://github.com/awxiaoxian2020/vitepress into zh
awxiaoxian2020 Jul 2, 2023
74cfc75
Merge branch 'main' into zh
awxiaoxian2020 Jul 2, 2023
1bb1b61
Merge branch 'main' into zh
awxiaoxian2020 Jul 22, 2023
afc920d
Merge branch 'main' into zh
awxiaoxian2020 Jul 27, 2023
b52b866
update config @https://github.com/vuejs/vitepress/commit/9a4ee0726019…
awxiaoxian2020 Aug 19, 2023
95dd69a
update docs
awxiaoxian2020 Aug 19, 2023
7575f24
merge branch 'main' into zh
awxiaoxian2020 Aug 19, 2023
05b1289
format
awxiaoxian2020 Aug 19, 2023
4e9ad5d
restore
awxiaoxian2020 Aug 19, 2023
e2a95ef
sync with non-translation for `markdown.md` at https://github.com/vue…
awxiaoxian2020 Aug 19, 2023
18c53ff
update `index.md` at https://github.com/vuejs/vitepress/commit/c0d838…
awxiaoxian2020 Aug 19, 2023
de0f76f
Merge branch 'main' into zh
awxiaoxian2020 Aug 29, 2023
af9dbe8
Merge branch 'main' into zh
awxiaoxian2020 Sep 7, 2023
d1475de
Merge branch 'main' into zh
awxiaoxian2020 Oct 1, 2023
28be070
update translations for config
awxiaoxian2020 Oct 1, 2023
58c2452
update `asset-handling.md` https://github.com/vuejs/vitepress/commit…
awxiaoxian2020 Oct 1, 2023
a8cc8ab
fix typo
awxiaoxian2020 Oct 1, 2023
88d0f15
Merge branch 'main' into zh
awxiaoxian2020 Oct 8, 2023
b4b34cc
Merge branch 'main' into zh
awxiaoxian2020 Oct 24, 2023
c9a2f62
Merge branch 'main' into zh
awxiaoxian2020 Oct 28, 2023
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
155 changes: 3 additions & 152 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { createRequire } from 'module'
import { defineConfig, type DefaultTheme } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('vitepress/package.json')
import { defineConfig } from 'vitepress'
import locales from './locales'

export default defineConfig({
lang: 'en-US',
title: 'VitePress',
description: 'Vite & Vue powered static site generator.',

lastUpdated: true,
cleanUrls: true,
Expand Down Expand Up @@ -35,150 +31,5 @@ export default defineConfig({
['script', { src: 'https://cdn.usefathom.com/script.js', 'data-site': 'AZBRSFGG', 'data-spa': 'auto', defer: '' }]
],

themeConfig: {
logo: { src: '/vitepress-logo-mini.svg', width: 24, height: 24 },

nav: nav(),

sidebar: {
'/guide/': { base: '/guide/', items: sidebarGuide() },
'/reference/': { base: '/reference/', items: sidebarReference() }
},

editLink: {
pattern: 'https://github.com/vuejs/vitepress/edit/main/docs/:path',
text: 'Edit this page on GitHub'
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
],

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2019-present Evan You'
},

search: {
provider: 'algolia',
options: {
appId: '8J64VVRP8K',
apiKey: 'a18e2f4cc5665f6602c5631fd868adfd',
indexName: 'vitepress'
}
},

carbonAds: {
code: 'CEBDT27Y',
placement: 'vuejsorg'
}
}
locales: locales.locales
})

function nav(): DefaultTheme.NavItem[] {
return [
{
text: 'Guide',
link: '/guide/what-is-vitepress',
activeMatch: '/guide/'
},
{
text: 'Reference',
link: '/reference/site-config',
activeMatch: '/reference/'
},
{
text: pkg.version,
items: [
{
text: 'Changelog',
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md'
},
{
text: 'Contributing',
link: 'https://github.com/vuejs/vitepress/blob/main/.github/contributing.md'
}
]
}
]
}

/* prettier-ignore */
function sidebarGuide(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Introduction',
collapsed: false,
items: [
{ text: 'What is VitePress?', link: 'what-is-vitepress' },
{ text: 'Getting Started', link: 'getting-started' },
{ text: 'Routing', link: 'routing' },
{ text: 'Deploy', link: 'deploy' }
]
},
{
text: 'Writing',
collapsed: false,
items: [
{ text: 'Markdown Extensions', link: 'markdown' },
{ text: 'Asset Handling', link: 'asset-handling' },
{ text: 'Frontmatter', link: 'frontmatter' },
{ text: 'Using Vue in Markdown', link: 'using-vue' },
{ text: 'Internationalization', link: 'i18n' }
]
},
{
text: 'Customization',
collapsed: false,
items: [
{ text: 'Using a Custom Theme', link: 'custom-theme' },
{ text: 'Extending the Default Theme', link: 'extending-default-theme' },
{ text: 'Build-Time Data Loading', link: 'data-loading' },
{ text: 'SSR Compatibility', link: 'ssr-compat' },
{ text: 'Connecting to a CMS', link: 'cms' }
]
},
{
text: 'Experimental',
collapsed: false,
items: [
{ text: 'MPA Mode', link: 'mpa-mode' },
{ text: 'Sitemap Generation', link: 'sitemap-generation' }
]
},
{ text: 'Config & API Reference', base: '/reference/', link: 'site-config' }
]
}

function sidebarReference(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Reference',
items: [
{ text: 'Site Config', link: 'site-config' },
{ text: 'Frontmatter Config', link: 'frontmatter-config' },
{ text: 'Runtime API', link: 'runtime-api' },
{ text: 'CLI', link: 'cli' },
{
text: 'Default Theme',
base: '/reference/default-theme-',
items: [
{ text: 'Overview', link: 'config' },
{ text: 'Nav', link: 'nav' },
{ text: 'Sidebar', link: 'sidebar' },
{ text: 'Home Page', link: 'home-page' },
{ text: 'Footer', link: 'footer' },
{ text: 'Layout', link: 'layout' },
{ text: 'Badge', link: 'badge' },
{ text: 'Team Page', link: 'team-page' },
{ text: 'Prev / Next Links', link: 'prev-next-links' },
{ text: 'Edit Link', link: 'edit-link' },
{ text: 'Last Updated Timestamp', link: 'last-updated' },
{ text: 'Search', link: 'search' },
{ text: 'Carbon Ads', link: 'carbon-ads' }
]
}
]
}
]
}
155 changes: 155 additions & 0 deletions docs/.vitepress/locales/en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import { createRequire } from 'module'
import { defineConfig, type DefaultTheme } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('vitepress/package.json')

export default defineConfig({
lang: 'en-US',
description: 'Vite & Vue powered static site generator.',

themeConfig: {
nav: nav(),

sidebar: {
'/guide/': { base: '/guide/', items: sidebarGuide() },
'/reference/': { base: '/reference/', items: sidebarReference() }
},

editLink: {
pattern: 'https://github.com/vuejs/vitepress/edit/main/docs/:path',
text: 'Edit this page on GitHub'
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
],

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2019-present Evan You'
},

search: {
provider: 'algolia',
options: {
appId: '8J64VVRP8K',
apiKey: 'a18e2f4cc5665f6602c5631fd868adfd',
indexName: 'vitepress'
}
},

carbonAds: {
code: 'CEBDT27Y',
placement: 'vuejsorg'
}
}
})

function nav(): DefaultTheme.NavItem[] {
return [
{
text: 'Guide',
link: '/guide/what-is-vitepress',
activeMatch: '/guide/'
},
{
text: 'Reference',
link: '/reference/site-config',
activeMatch: '/reference/'
},
{
text: pkg.version,
items: [
{
text: 'Changelog',
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md'
},
{
text: 'Contributing',
link: 'https://github.com/vuejs/vitepress/blob/main/.github/contributing.md'
}
]
}
]
}

/* prettier-ignore */
function sidebarGuide(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Introduction',
collapsed: false,
items: [
{ text: 'What is VitePress?', link: 'what-is-vitepress' },
{ text: 'Getting Started', link: 'getting-started' },
{ text: 'Routing', link: 'routing' },
{ text: 'Deploy', link: 'deploy' }
]
},
{
text: 'Writing',
collapsed: false,
items: [
{ text: 'Markdown Extensions', link: 'markdown' },
{ text: 'Asset Handling', link: 'asset-handling' },
{ text: 'Frontmatter', link: 'frontmatter' },
{ text: 'Using Vue in Markdown', link: 'using-vue' },
{ text: 'Internationalization', link: 'i18n' }
]
},
{
text: 'Customization',
collapsed: false,
items: [
{ text: 'Using a Custom Theme', link: 'custom-theme' },
{ text: 'Extending the Default Theme', link: 'extending-default-theme' },
{ text: 'Build-Time Data Loading', link: 'data-loading' },
{ text: 'SSR Compatibility', link: 'ssr-compat' },
{ text: 'Connecting to a CMS', link: 'cms' }
]
},
{
text: 'Experimental',
collapsed: false,
items: [
{ text: 'MPA Mode', link: 'mpa-mode' },
{ text: 'Sitemap Generation', link: 'sitemap-generation' }
]
},
{ text: 'Config & API Reference', base: '/reference/', link: 'site-config' }
]
}

function sidebarReference(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Reference',
items: [
{ text: 'Site Config', link: 'site-config' },
{ text: 'Frontmatter Config', link: 'frontmatter-config' },
{ text: 'Runtime API', link: 'runtime-api' },
{ text: 'CLI', link: 'cli' },
{
text: 'Default Theme',
base: '/reference/default-theme-',
items: [
{ text: 'Overview', link: 'config' },
{ text: 'Nav', link: 'nav' },
{ text: 'Sidebar', link: 'sidebar' },
{ text: 'Home Page', link: 'home-page' },
{ text: 'Footer', link: 'footer' },
{ text: 'Layout', link: 'layout' },
{ text: 'Badge', link: 'badge' },
{ text: 'Team Page', link: 'team-page' },
{ text: 'Prev / Next Links', link: 'prev-next-links' },
{ text: 'Edit Link', link: 'edit-link' },
{ text: 'Last Updated Timestamp', link: 'last-updated' },
{ text: 'Search', link: 'search' },
{ text: 'Carbon Ads', link: 'carbon-ads' }
]
}
]
}
]
}
20 changes: 20 additions & 0 deletions docs/.vitepress/locales/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'vitepress'
import en from './en'
import zh from './zh'

export default defineConfig({
locales: {
root: {
label: 'English',
lang: en.lang,
themeConfig: en.themeConfig,
description: en.description
},
zh: {
label: '简体中文',
lang: zh.lang,
themeConfig: zh.themeConfig,
description: zh.description
}
}
})
Loading