优化:将各分类菜单聚合到一个导航菜单下
This commit is contained in:
@@ -2,33 +2,27 @@ import DefaultTheme from 'vitepress/theme'
|
||||
|
||||
export const nav: DefaultTheme.Config['nav'] = [
|
||||
{
|
||||
text: 'Bug万象集',
|
||||
link: '/issues/index',
|
||||
activeMatch: '/issues/' // 当前页面处于匹配路径下时, 对应导航菜单将突出显示
|
||||
},
|
||||
{
|
||||
text: '"杂碎"逆袭史',
|
||||
link: '/fragments/index',
|
||||
activeMatch: '/fragments/'
|
||||
},
|
||||
{
|
||||
text: '方案春秋志',
|
||||
link: '/solutions/index',
|
||||
activeMatch: '/solutions/'
|
||||
text: '我的分类',
|
||||
items: [
|
||||
{ text: 'Bug万象集', link: '/categories/issues/index', activeMatch: '/categories/issues/' },
|
||||
{ text: '"杂碎"逆袭史', link: '/categories/fragments/index', activeMatch: '/categories/fragments/' },
|
||||
{ text: '方案春秋志', link: '/categories/solutions/index', activeMatch: '/categories/solutions/' }
|
||||
],
|
||||
activeMatch: '/categories/'
|
||||
},
|
||||
{
|
||||
text: '我的小课',
|
||||
items: [
|
||||
{ text: 'MyBatis快速入门', link: '/courses/mybatis/index' }
|
||||
{ text: 'MyBatis快速入门', link: '/courses/mybatis/index', activeMatch: '/courses/mybatis/' }
|
||||
],
|
||||
activeMatch: '/courses/'
|
||||
},
|
||||
{
|
||||
text: '关于',
|
||||
items: [
|
||||
{ text: '关于知识库', link: '/about/index' },
|
||||
{ text: '关于我', link: '/about/me' }
|
||||
{ text: '关于知识库', link: '/about/index', activeMatch: '/about/index.html' },
|
||||
{ text: '关于我', link: '/about/me', activeMatch: '/about/me.html' }
|
||||
],
|
||||
activeMatch: '/about/'
|
||||
activeMatch: '/about/' // // 当前页面处于匹配路径下时, 对应导航菜单将突出显示
|
||||
}
|
||||
]
|
@@ -2,9 +2,9 @@ import DefaultTheme from 'vitepress/theme'
|
||||
import { sync } from "fast-glob"
|
||||
|
||||
export const sidebar: DefaultTheme.Config['sidebar'] = {
|
||||
'/issues/': getItemsByDate("issues"),
|
||||
'/fragments/': getItemsByDate("fragments"),
|
||||
'/solutions/': getItemsByDate("solutions"),
|
||||
'/categories/issues/': getItemsByDate("categories/issues"),
|
||||
'/categories/fragments/': getItemsByDate("categories/fragments"),
|
||||
'/categories/solutions/': getItemsByDate("categories/solutions"),
|
||||
'/courses/mybatis/': getItems("courses/mybatis")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user