From d68fe46acbc669322f42843544a00cdc9cb0134a Mon Sep 17 00:00:00 2001 From: QIU SHENGMING Date: Wed, 26 Nov 2025 21:01:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8DAI?= =?UTF-8?q?=E6=91=98=E8=A6=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/posts/[...slug].astro | 144 +++++++++++++++----------------- 1 file changed, 67 insertions(+), 77 deletions(-) diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 3f3d8b7..05885cf 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -138,86 +138,76 @@ const jsonLd = {
- - - -
- - - - + // 绑定 Swup 和 页面加载事件 + document.addEventListener('swup:page:view', triggerHongmo); + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', triggerHongmo); + } else { + triggerHongmo(); + } + +