Skip to content

Commit

Permalink
docs: update types for theme config (#3118)
Browse files Browse the repository at this point in the history
* docs: update types for theme config
  • Loading branch information
userquin authored Oct 21, 2023
1 parent 71bed58 commit 5542f29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/guide/extending-default-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 5542f29

Please sign in to comment.