Skip to content

Commit

Permalink
docs: use extends instead of spreading default theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Sep 27, 2023
1 parent 7ea2cfa commit 44f5716
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 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 44f5716

Please sign in to comment.