mirror of
https://github.com/fmhy/edit.git
synced 2026-02-18 09:11:33 +11:00
comment
This commit is contained in:
parent
8a920f47d5
commit
7f5d64c542
1 changed files with 15 additions and 7 deletions
|
|
@ -1,16 +1,24 @@
|
||||||
import { type Theme } from 'vitepress'
|
import { type Theme } from 'vitepress' // Import the Theme type from VitePress
|
||||||
import DefaultTheme from 'vitepress/theme'
|
import DefaultTheme from 'vitepress/theme' // Import the default VitePress theme
|
||||||
import Layout from './Layout.vue'
|
import Layout from './Layout.vue' // Import the custom layout component
|
||||||
import Post from './PostLayout.vue'
|
import Post from './PostLayout.vue' // Import the custom post layout component
|
||||||
import { loadProgress } from './composables/nprogress'
|
import { loadProgress } from './composables/nprogress' // Import the loadProgress function
|
||||||
import './style.css'
|
import './style.css' // Import the custom global CSS styles
|
||||||
import 'uno.css'
|
import 'uno.css' // Import the uno.css library
|
||||||
|
|
||||||
|
// The custom VitePress theme
|
||||||
export default {
|
export default {
|
||||||
|
// Extend the default VitePress theme
|
||||||
extends: DefaultTheme,
|
extends: DefaultTheme,
|
||||||
|
// Use the custom layout component
|
||||||
Layout,
|
Layout,
|
||||||
|
// Use the custom post layout component
|
||||||
|
Post,
|
||||||
|
// The enhanceApp function is called after the VitePress app is mounted
|
||||||
enhanceApp({ router, app }) {
|
enhanceApp({ router, app }) {
|
||||||
|
// Add the custom post layout component to the VitePress app
|
||||||
app.component('Post', Post)
|
app.component('Post', Post)
|
||||||
|
// Call the loadProgress function with the router object as an argument
|
||||||
loadProgress(router)
|
loadProgress(router)
|
||||||
}
|
}
|
||||||
} satisfies Theme
|
} satisfies Theme
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue