Files
zh-grammar/docs/.vitepress/theme/index.ts
T
2026-03-18 14:28:46 +07:00

25 lines
645 B
TypeScript

import "./style.css";
import "./custom.css";
import DefaultTheme from "vitepress/theme";
// https://vitepress.dev/guide/custom-theme
import { h } from "vue";
import SentenceQuiz from "./components/SentenceQuiz.vue";
import TOC from "./components/TOC.vue";
import type { Theme } from "vitepress";
export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
});
},
enhanceApp({ app, router, siteData }) {
// ...
app.component("SentenceQuiz", SentenceQuiz);
app.component("TOC", TOC);
},
} satisfies Theme;