From 211f1000364772dd1a78f850a9c587a635c457a4 Mon Sep 17 00:00:00 2001 From: maicss Date: Mon, 6 Nov 2023 23:01:14 +0800 Subject: [PATCH] add giscus --- .vitepress/config.mts | 1 + .vitepress/theme/custom.css | 7 +++ .vitepress/theme/giscusLayout.vue | 79 +++++++++++++++++++++++++++++-- .vitepress/theme/index.mts | 4 +- package.json | 3 ++ pages/pyqt/index.md | 16 ------- pages/pyqt/v6/index.md | 1 + pnpm-lock.yaml | 47 ++++++++++++++++++ 8 files changed, 136 insertions(+), 22 deletions(-) create mode 100644 .vitepress/theme/custom.css diff --git a/.vitepress/config.mts b/.vitepress/config.mts index a481c7e..0109e93 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -36,6 +36,7 @@ export default defineConfig({ outline: { label: 'TOC' }, + returnToTopLabel: 'returnToTopLabel', docFooter: { prev: '上一篇', next: '下一篇' diff --git a/.vitepress/theme/custom.css b/.vitepress/theme/custom.css new file mode 100644 index 0000000..21e2782 --- /dev/null +++ b/.vitepress/theme/custom.css @@ -0,0 +1,7 @@ +* { + scrollbar-width: thin; +} +*::-webkit-scrollbar { + width: 5px; + height: 5px; + } diff --git a/.vitepress/theme/giscusLayout.vue b/.vitepress/theme/giscusLayout.vue index 7b2318f..55575f9 100644 --- a/.vitepress/theme/giscusLayout.vue +++ b/.vitepress/theme/giscusLayout.vue @@ -1,11 +1,27 @@