mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
3.9 KiB
140 lines
3.9 KiB
2 years ago
|
import { createRequire } from 'module'
|
||
1 year ago
|
import { defineConfig, type DefaultTheme } from 'vitepress'
|
||
2 years ago
|
|
||
|
const require = createRequire(import.meta.url)
|
||
|
const pkg = require('vitepress/package.json')
|
||
3 years ago
|
|
||
12 months ago
|
export const en = defineConfig({
|
||
4 years ago
|
lang: 'en-US',
|
||
|
description: 'Vite & Vue powered static site generator.',
|
||
|
|
||
3 years ago
|
themeConfig: {
|
||
3 years ago
|
nav: nav(),
|
||
4 years ago
|
|
||
|
sidebar: {
|
||
1 year ago
|
'/guide/': { base: '/guide/', items: sidebarGuide() },
|
||
|
'/reference/': { base: '/reference/', items: sidebarReference() }
|
||
3 years ago
|
},
|
||
|
|
||
|
editLink: {
|
||
3 years ago
|
pattern: 'https://github.com/vuejs/vitepress/edit/main/docs/:path',
|
||
3 years ago
|
text: 'Edit this page on GitHub'
|
||
|
},
|
||
|
|
||
3 years ago
|
footer: {
|
||
|
message: 'Released under the MIT License.',
|
||
|
copyright: 'Copyright © 2019-present Evan You'
|
||
4 years ago
|
}
|
||
|
}
|
||
3 years ago
|
})
|
||
4 years ago
|
|
||
1 year ago
|
function nav(): DefaultTheme.NavItem[] {
|
||
3 years ago
|
return [
|
||
1 year ago
|
{
|
||
|
text: 'Guide',
|
||
|
link: '/guide/what-is-vitepress',
|
||
|
activeMatch: '/guide/'
|
||
|
},
|
||
2 years ago
|
{
|
||
2 years ago
|
text: 'Reference',
|
||
|
link: '/reference/site-config',
|
||
|
activeMatch: '/reference/'
|
||
2 years ago
|
},
|
||
3 years ago
|
{
|
||
2 years ago
|
text: pkg.version,
|
||
3 years ago
|
items: [
|
||
|
{
|
||
|
text: 'Changelog',
|
||
|
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md'
|
||
|
},
|
||
3 years ago
|
{
|
||
|
text: 'Contributing',
|
||
|
link: 'https://github.com/vuejs/vitepress/blob/main/.github/contributing.md'
|
||
2 years ago
|
}
|
||
|
]
|
||
|
}
|
||
3 years ago
|
]
|
||
|
}
|
||
|
|
||
1 year ago
|
function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||
4 years ago
|
return [
|
||
|
{
|
||
|
text: 'Introduction',
|
||
2 years ago
|
collapsed: false,
|
||
3 years ago
|
items: [
|
||
1 year ago
|
{ text: 'What is VitePress?', link: 'what-is-vitepress' },
|
||
|
{ text: 'Getting Started', link: 'getting-started' },
|
||
|
{ text: 'Routing', link: 'routing' },
|
||
|
{ text: 'Deploy', link: 'deploy' }
|
||
3 years ago
|
]
|
||
|
},
|
||
|
{
|
||
|
text: 'Writing',
|
||
2 years ago
|
collapsed: false,
|
||
3 years ago
|
items: [
|
||
1 year ago
|
{ 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' }
|
||
3 years ago
|
]
|
||
3 years ago
|
},
|
||
3 years ago
|
{
|
||
2 years ago
|
text: 'Customization',
|
||
2 years ago
|
collapsed: false,
|
||
3 years ago
|
items: [
|
||
1 year ago
|
{ text: 'Using a Custom Theme', link: 'custom-theme' },
|
||
12 months ago
|
{
|
||
|
text: 'Extending the Default Theme',
|
||
|
link: 'extending-default-theme'
|
||
|
},
|
||
1 year ago
|
{ text: 'Build-Time Data Loading', link: 'data-loading' },
|
||
|
{ text: 'SSR Compatibility', link: 'ssr-compat' },
|
||
|
{ text: 'Connecting to a CMS', link: 'cms' }
|
||
3 years ago
|
]
|
||
3 years ago
|
},
|
||
2 years ago
|
{
|
||
|
text: 'Experimental',
|
||
|
collapsed: false,
|
||
|
items: [
|
||
1 year ago
|
{ text: 'MPA Mode', link: 'mpa-mode' },
|
||
|
{ text: 'Sitemap Generation', link: 'sitemap-generation' }
|
||
2 years ago
|
]
|
||
|
},
|
||
1 year ago
|
{ text: 'Config & API Reference', base: '/reference/', link: 'site-config' }
|
||
4 years ago
|
]
|
||
|
}
|
||
|
|
||
1 year ago
|
function sidebarReference(): DefaultTheme.SidebarItem[] {
|
||
4 years ago
|
return [
|
||
|
{
|
||
2 years ago
|
text: 'Reference',
|
||
3 years ago
|
items: [
|
||
1 year ago
|
{ text: 'Site Config', link: 'site-config' },
|
||
|
{ text: 'Frontmatter Config', link: 'frontmatter-config' },
|
||
|
{ text: 'Runtime API', link: 'runtime-api' },
|
||
|
{ text: 'CLI', link: 'cli' },
|
||
2 years ago
|
{
|
||
|
text: 'Default Theme',
|
||
1 year ago
|
base: '/reference/default-theme-',
|
||
2 years ago
|
items: [
|
||
1 year ago
|
{ 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' }
|
||
2 years ago
|
]
|
||
|
}
|
||
3 years ago
|
]
|
||
4 years ago
|
}
|
||
|
]
|
||
4 years ago
|
}
|