From 7f5d64c542a871be7f60cb6491911072ffaebfcc Mon Sep 17 00:00:00 2001 From: maropboia <164220066+maropboia@users.noreply.github.com> Date: Fri, 3 May 2024 11:38:26 +0600 Subject: [PATCH] comment --- .vitepress/theme/index.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index f3760e891..b0b6f4e51 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -1,16 +1,24 @@ -import { type Theme } from 'vitepress' -import DefaultTheme from 'vitepress/theme' -import Layout from './Layout.vue' -import Post from './PostLayout.vue' -import { loadProgress } from './composables/nprogress' -import './style.css' -import 'uno.css' +import { type Theme } from 'vitepress' // Import the Theme type from VitePress +import DefaultTheme from 'vitepress/theme' // Import the default VitePress theme +import Layout from './Layout.vue' // Import the custom layout component +import Post from './PostLayout.vue' // Import the custom post layout component +import { loadProgress } from './composables/nprogress' // Import the loadProgress function +import './style.css' // Import the custom global CSS styles +import 'uno.css' // Import the uno.css library +// The custom VitePress theme export default { + // Extend the default VitePress theme extends: DefaultTheme, + // Use the custom layout component Layout, + // Use the custom post layout component + Post, + // The enhanceApp function is called after the VitePress app is mounted enhanceApp({ router, app }) { + // Add the custom post layout component to the VitePress app app.component('Post', Post) + // Call the loadProgress function with the router object as an argument loadProgress(router) } } satisfies Theme