Skip to content

Commit 5542f29

Browse files
authored
docs: update types for theme config (#3118)
* docs: update types for theme config
1 parent 71bed58 commit 5542f29

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/guide/extending-default-theme.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@ import type { Theme } from 'vitepress'
115115
import DefaultTheme from 'vitepress/theme'
116116

117117
export default {
118-
// ...
118+
extends: DefaultTheme,
119119
async enhanceApp({ app }) {
120-
if (!import.meta.env.SSR) {
121-
const plugin = await import('plugin-that-access-window-on-import')
122-
app.use(plugin)
123-
}
120+
// register your custom global components
121+
ctx.app.component('MyGlobalComponent' /* ... */)
124122
}
125123
} satisfies Theme
126124
```

0 commit comments

Comments
 (0)