Files
duyl328.github.io/docs/.vitepress/theme/index.ts
T
2025-01-19 16:47:20 +08:00

24 lines
726 B
TypeScript

// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import Theme from 'vitepress/theme-without-fonts' // https://vitepress.dev/zh/guide/extending-default-theme#using-different-fonts
// 引入组件库的少量全局样式变量
import 'tdesign-vue-next/es/style/index.css'
import './style.css'
import Comment from './components/Comment.vue'
import ImageViewer from './components/ImageViewer.vue'
import GoBack from './components/GoBack.vue'
export default {
...Theme,
Layout: () => {
return h(Theme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
'doc-after': () => h(Comment),
'doc-bottom': () => h(ImageViewer),
'aside-top': () => h(GoBack),
})
},
}