-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from GlobeMC/dev
Update Main Branch
- Loading branch information
Showing
4 changed files
with
54 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,49 @@ | ||
import Theme from "vitepress/theme" | ||
import { h } from "vue" | ||
import Comment from "./components/Comment.vue" | ||
import Contributors from "./components/Contributors.vue" | ||
import LauncherBadge from "./components/LauncherBadge.vue" | ||
import ReloadPrompt from "./components/ReloadPrompt.vue" | ||
import giscusTalk from "vitepress-plugin-comment-with-giscus" | ||
import { useData, useRoute } from "vitepress" | ||
import "./style.css" | ||
|
||
export default { | ||
...Theme, | ||
Layout: () => { | ||
return h(Theme.Layout, null, { | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
"doc-after": () => h(Comment), | ||
"doc-footer-before": () => h(Contributors), | ||
"layout-bottom": () => h(ReloadPrompt), | ||
}) | ||
}, | ||
enhanceApp(ctx) { | ||
ctx.app.component("LauncherBadge", LauncherBadge) | ||
}, | ||
setup() { | ||
// Get frontmatter and route | ||
const { frontmatter } = useData() | ||
const route = useRoute() | ||
|
||
// Obtain configuration from: https://giscus.app/ | ||
giscusTalk( | ||
{ | ||
repo: "GlobeMC/crashmc.com", | ||
repoId: "R_kgDOKBR8xw", | ||
category: "Giscus", | ||
categoryId: "DIC_kwDOKBR8x84CYOmB", | ||
mapping: "title", | ||
strict: "0", | ||
reactionsEnabled: "1", | ||
emitMetadata: "0", | ||
inputPosition: "top", | ||
theme: "preferred_color_scheme", | ||
lang: "zh-CN", | ||
loading: "lazy", | ||
}, | ||
{ | ||
frontmatter, | ||
route, | ||
}, | ||
) | ||
}, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.