Skip to content

Commit

Permalink
docs: use extends instead of spreading default theme (#14403)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Sep 18, 2023
1 parent 7ceb48f commit dc5896c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { h } from 'vue'
import Theme from 'vitepress/theme'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './styles/vars.css'
import HomeSponsors from './components/HomeSponsors.vue'
import AsideSponsors from './components/AsideSponsors.vue'
import SvgImage from './components/SvgImage.vue'

export default {
...Theme,
extends: DefaultTheme,
Layout() {
return h(Theme.Layout, null, {
return h(DefaultTheme.Layout, null, {
'home-features-after': () => h(HomeSponsors),
'aside-ads-before': () => h(AsideSponsors),
})
},
enhanceApp({ app }) {
app.component('SvgImage', SvgImage)
},
}
} satisfies Theme

0 comments on commit dc5896c

Please sign in to comment.