Skip to content

Commit

Permalink
Update Vitepress config to improve sidebar options
Browse files Browse the repository at this point in the history
  • Loading branch information
Leetfs committed Sep 7, 2024
1 parent 5a8a432 commit f40d8d0
Showing 1 changed file with 20 additions and 32 deletions.
52 changes: 20 additions & 32 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,26 @@ const nav = [
},
]


const sidebarOptions = [
// 数据库
{
...baseConfig,
scanStartPath: 'sql',
},
// 贡献指南
{
...baseConfig,
scanStartPath: 'contributor-guide',
resolvePath: '/contributor-guide/',
},
// 网页
{
...baseConfig,
scanStartPath: 'web',
resolvePath: '/web/',
},
// 计算机基础
{
...baseConfig,
scanStartPath: 'computer',
resolvePath: '/computer/',
},
// 其它
{
...baseConfig,
scanStartPath: 'others',
resolvePath: '/others/',
},
]
// 侧边栏配置项
const sidebar = {
'/sql/': [
{ text: 'SQL 入门', link: '/sql/' },
],
'/contributor-guide/': [
{ text: '投稿指南', link: '/contributor-guide/campus.md' },
{ text: '其他投稿', link: '/contributor-guide/other.md' },
{ text: '贡献模板', link: '/contributor-guide/CampusTemplate.md' },
],
'/web/': [
{ text: 'HTML', link: '/web/' },
],
'/computer/': [
{ text: '计算机原理', link: '/computer/' },
],
'/others/': [
{ text: '其他内容', link: '/others/' },
],
}

// 主题配置项
const themeConfig = {
Expand Down

0 comments on commit f40d8d0

Please sign in to comment.