新增:《关于笔者》

This commit is contained in:
2022-07-21 18:01:20 +08:00
parent ca9169fddf
commit a87b93dc0e
9 changed files with 75 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
import type { DefaultTheme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
export const nav: DefaultTheme.Config['nav'] = [
{
@@ -12,8 +12,11 @@ export const nav: DefaultTheme.Config['nav'] = [
activeMatch: '/fragments/'
},
{
text: '关于知识库',
link: '/about/index',
activeMatch: '/about/',
text: '关于',
items: [
{ text: '关于知识库', link: '/about/index' },
{ text: '关于笔者', link: '/about/me' }
],
activeMatch: '/about/'
}
]

View File

@@ -1,16 +1,9 @@
import type { DefaultTheme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { sync } from "fast-glob"
export const sidebar: DefaultTheme.Config['sidebar'] = {
'/issues/': getItems("issues"),
'/fragments/': getItems("fragments"),
'/about/': [
{
items: [
{ text: '关于笔者', link: '/about/me' }
]
}
]
'/fragments/': getItems("fragments")
}
/**

View File

@@ -1,4 +1,4 @@
import type { DefaultTheme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { nav } from './nav'
import { sidebar } from './sidebar'

View File

@@ -1,9 +1,29 @@
import DefaultTheme from 'vitepress/theme'
import ElementPlus from 'element-plus'
import "element-plus/dist/index.css"
import * as ElIcons from '@element-plus/icons-vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import * as AntdIcons from '@ant-design/icons-vue'
import './custom.css'
export default {
...DefaultTheme,
enhanceApp({ app }) {
// register global components
// 全局注册ElementPlus的所有图标
for (const [key, elIcon] of Object.entries(ElIcons)) {
app.component(key, elIcon)
}
// 全局注册ElementPlus
app.use(ElementPlus)
// 全局注册Ant Design of Vue的所有图标
for (const [key, antdIcon] of Object.entries(AntdIcons)) {
app.component(key, antdIcon)
}
// 全局注册Ant Design of Vue
app.use(Antd)
}
}