From 2999b6d02379a92892c4521064d864322991fca7 Mon Sep 17 00:00:00 2001 From: zywoote3ture <3355324252@qq.com> Date: Mon, 3 Nov 2025 14:17:01 +0800 Subject: [PATCH 1/2] feat(docs): add Giscus comment system using GitHub Discussions --- docs/mkdocs.yml | 2 ++ docs/overrides/partials/content.html | 39 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 docs/overrides/partials/content.html diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index da6da2a87..df4e09e1a 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -77,6 +77,7 @@ nav: theme: name: material + custom_dir: overrides language: zh features: - search.highlight @@ -143,3 +144,4 @@ extra_javascript: # - https://polyfill.io/v3/polyfill.min.js?features=es6 - https://polyfill.alicdn.com/v3/polyfill.min.js?features=es6 - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js + diff --git a/docs/overrides/partials/content.html b/docs/overrides/partials/content.html new file mode 100644 index 000000000..4f4c47468 --- /dev/null +++ b/docs/overrides/partials/content.html @@ -0,0 +1,39 @@ + +{{ page.content }} + + +{% if page and page.meta and page.meta.comments != false %} + {# 可选:如果 MD 文件开头有 --- comments: false ---,则隐藏 #} +{% endif %} +

讨论区

+
+ + + + + + \ No newline at end of file From c16adf6964972b5fcdc12f1c702ff12a44ea3b55 Mon Sep 17 00:00:00 2001 From: zywoote3ture <3355324252@qq.com> Date: Thu, 6 Nov 2025 19:08:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E6=8F=8F=E8=BF=B0=E4=BD=A0=E6=94=B9?= =?UTF-8?q?=E4=BA=86=E4=BB=80=E4=B9=88=EF=BC=88=E7=9F=AD=E5=8F=A5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/overrides/partials/content.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/overrides/partials/content.html b/docs/overrides/partials/content.html index 4f4c47468..d15ee81e0 100644 --- a/docs/overrides/partials/content.html +++ b/docs/overrides/partials/content.html @@ -10,10 +10,8 @@

讨论区