引入组件
ts
// .vitepress/theme/index.ts
import DefaultTheme from 'vitepress/theme'
import { HomeUnderline } from '@theojs/lumen'
export default {
extends: DefaultTheme,
enhanceApp: ({ app }) => {
app.component('Home', HomeUnderline)
}
...
}
使用
md
---
layout: home
hero:
name: Lumen
text: 'Enhanced '
textsuffix: 'Theme'
tagline: ✨ 集成 Vue 功能组件和主题美化的 VitePress 插件
---
<Home />