doc.yeswiki.pro/node_modules/vitepress/template/.vitepress/theme/index.js

26 lines
542 B
JavaScript
Raw Normal View History

2023-05-20 16:37:42 +00:00
// https://vitepress.dev/guide/custom-theme
<% if (!defaultTheme) { %>import Layout from './Layout.vue'
import './style.css'
export default {
Layout,
enhanceApp({ app, router, siteData }) {
// ...
}
}
<% } else { %>import { h } from 'vue'
import Theme from 'vitepress/theme'
import './style.css'
export default {
...Theme,
Layout: () => {
return h(Theme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
// ...
}
}<% } %>