-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use extends instead of spreading default theme (#503)
* docs: feedback about experimental features * docs: update the proxy options link * docs: use extends instead of spreading default theme
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters