From 2a59b7ea8d49183b2d4fb86f99fe1d583cab71e9 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sun, 26 Jun 2022 17:22:04 +0530 Subject: [PATCH] docs: add information about setup in theme --- docs/guide/theme-introduction.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/guide/theme-introduction.md b/docs/guide/theme-introduction.md index 09d56d66..b3ebd5f7 100644 --- a/docs/guide/theme-introduction.md +++ b/docs/guide/theme-introduction.md @@ -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. + } } ```