mirror of
https://github.com/doocs/advanced-java.git
synced 2026-08-18 10:43:29 +08:00
Align with sibling Doocs projects: add TypeScript tooling, pin GitHub Actions to Node 24-compatible versions, and bump pnpm to v10.
38 lines
881 B
TypeScript
38 lines
881 B
TypeScript
import DefaultTheme from "vitepress/theme";
|
|
import giscusTalk from "vitepress-plugin-comment-with-giscus";
|
|
import { useData, useRoute } from "vitepress";
|
|
import { toRefs } from "vue";
|
|
import type { Theme } from "vitepress";
|
|
import Layout from "./Layout.vue";
|
|
|
|
export default {
|
|
extends: DefaultTheme,
|
|
Layout,
|
|
enhanceApp(ctx) {
|
|
DefaultTheme.enhanceApp(ctx);
|
|
},
|
|
setup() {
|
|
const { frontmatter } = toRefs(useData());
|
|
const route = useRoute();
|
|
|
|
giscusTalk(
|
|
{
|
|
repo: "doocs/advanced-java",
|
|
repoId: "MDEwOlJlcG9zaXRvcnkxNTE4MzQwNjI=",
|
|
mapping: "number",
|
|
inputPosition: "top",
|
|
lang: "zh-CN",
|
|
homePageShowComment: true,
|
|
term: "9",
|
|
lightTheme: "light",
|
|
darkTheme: "transparent_dark",
|
|
},
|
|
{
|
|
frontmatter,
|
|
route,
|
|
},
|
|
true,
|
|
);
|
|
},
|
|
} satisfies Theme;
|