docs: add information about setup in theme

pull/1136/head
Divyansh Singh 3 years ago
parent 8d101ec66f
commit 2a59b7ea8d

@ -38,6 +38,7 @@ interface Theme {
Layout: Component // Vue 3 component
NotFound?: Component
enhanceApp?: (ctx: EnhanceAppContext) => void
setup?: () => void
}
interface EnhanceAppContext {
@ -65,6 +66,11 @@ export default {
// router is VitePress' custom router. `siteData` is
// a `ref` of current site-level metadata.
}
setup() {
// this function will be executed inside VitePressApp's
// setup hook. all composition APIs are available here.
}
}
```

Loading…
Cancel
Save