From a08c717ed8eedf15b6ea24c1b44ddaa17b277f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E5=8F=89=E6=A0=91=E6=A0=91?= Date: Sun, 25 Jan 2026 21:37:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BARSS=E8=AF=B7=E6=B1=82=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=BC=93=E5=AD=98=E7=A6=81=E7=94=A8=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E4=BB=A5=E8=8E=B7=E5=8F=96=E6=9C=80=E6=96=B0=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在fetch请求中设置cache: 'no-store',防止浏览器缓存导致无法及时获取最新的RSS内容,确保新文章通知能正确显示。 --- src/components/widget/NewPostNotification.astro | 2 +- src/content/posts/pin.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/widget/NewPostNotification.astro b/src/components/widget/NewPostNotification.astro index 9cbdc7bf6..78b3c2748 100644 --- a/src/components/widget/NewPostNotification.astro +++ b/src/components/widget/NewPostNotification.astro @@ -112,7 +112,7 @@ // Helper to get current RSS items async function fetchRSS() { try { - const response = await fetch('/rss.xml'); + const response = await fetch('/rss.xml', { cache: 'no-store' }); const text = await response.text(); const parser = new DOMParser(); const xml = parser.parseFromString(text, 'text/xml'); diff --git a/src/content/posts/pin.md b/src/content/posts/pin.md index ea5c47d24..b89d16172 100644 --- a/src/content/posts/pin.md +++ b/src/content/posts/pin.md @@ -3,7 +3,7 @@ title: 加群向导 image: /random/h published: 2025-05-24 pinned: true -description: 关于如何联系二叉树树~ +description: 关于如何联系二叉树树~ 开始技术切磋! ---