docs: update types for theme config (#3118)

* docs: update types for theme config
pull/3122/head
Joaquín Sánchez 1 year ago committed by GitHub
parent 71bed58936
commit 5542f29569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,12 +115,10 @@ import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
export default {
// ...
extends: DefaultTheme,
async enhanceApp({ app }) {
if (!import.meta.env.SSR) {
const plugin = await import('plugin-that-access-window-on-import')
app.use(plugin)
}
// register your custom global components
ctx.app.component('MyGlobalComponent' /* ... */)
}
} satisfies Theme
```

Loading…
Cancel
Save