Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use extends instead of spreading default theme #503

Merged
merged 4 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion docs/config/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ De forma predeterminada, Vite vaciará `outDir` en la compilación si está dent
## build.copyPublicDir

- **Experimental** [Hacer Comentarios](https://github.com/vitejs/vite/discussions/13807)

- **Tipo:** `boolean`
- **Por defecto:** `true`

Expand Down