From 28ffdb4205289e19f93bbe0f247815d5b5f4d86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E5=8F=89=E6=A0=91=E6=A0=91?= Date: Sat, 24 Jan 2026 10:02:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=AF=E7=94=A8=20Giscus=20=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E7=B3=BB=E7=BB=9F=E7=9A=84=E4=B8=A5=E6=A0=BC=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 data-strict 属性从 "0" 改为 "1",确保评论仅关联到实际发布的文章页面,避免在预览或非目标页面上加载评论。 --- src/content/.obsidian/workspace.json | 22 +++++++++++----------- src/pages/posts/[...slug].astro | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/content/.obsidian/workspace.json b/src/content/.obsidian/workspace.json index b9c9ed45c..8d17b901c 100644 --- a/src/content/.obsidian/workspace.json +++ b/src/content/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "posts/del-git-commit.md", + "file": "posts/mac-gal.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "del-git-commit" + "title": "mac-gal" } } ] @@ -94,7 +94,7 @@ "state": { "type": "backlink", "state": { - "file": "posts/del-git-commit.md", + "file": "posts/mac-gal.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -104,7 +104,7 @@ "unlinkedCollapsed": true }, "icon": "links-coming-in", - "title": "del-git-commit 的反向链接列表" + "title": "mac-gal 的反向链接列表" } }, { @@ -113,12 +113,12 @@ "state": { "type": "outgoing-link", "state": { - "file": "posts/del-git-commit.md", + "file": "posts/mac-gal.md", "linksCollapsed": false, "unlinkedCollapsed": true }, "icon": "links-going-out", - "title": "del-git-commit 的出链列表" + "title": "mac-gal 的出链列表" } }, { @@ -142,13 +142,13 @@ "state": { "type": "outline", "state": { - "file": "posts/del-git-commit.md", + "file": "posts/mac-gal.md", "followCursor": false, "showSearch": false, "searchQuery": "" }, "icon": "lucide-list", - "title": "del-git-commit 的大纲" + "title": "mac-gal 的大纲" } } ] @@ -171,6 +171,9 @@ }, "active": "ea8fe4fe54e0109e", "lastOpenFiles": [ + "posts/self-host-matrix.md", + "posts/gal.md", + "posts/del-git-commit.md", "assets/images/del-git-commit-9.png", "assets/images/del-git-commit-8.png", "assets/images/del-git-commit-7.png", @@ -181,9 +184,6 @@ "assets/images/del-git-commit-2.png", "assets/images/del-git-commit-1.png", "assets/images/del-git-commit.png", - "posts/gal.md", - "posts/del-git-commit.md", - "assets/images/gal-5.png", "2024-11-20.md", "posts/fuwari.md" ] diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 8ae62a5dd..89746db18 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -178,7 +178,7 @@ const jsonLd = { script.setAttribute("data-category", "Announcements"); script.setAttribute("data-category-id", "DIC_kwDOOi8qu84CprDV"); script.setAttribute("data-mapping", "pathname"); - script.setAttribute("data-strict", "0"); + script.setAttribute("data-strict", "1"); script.setAttribute("data-reactions-enabled", "1"); script.setAttribute("data-emit-metadata", "0"); script.setAttribute("data-input-position", "top");