diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro index b29ab9f..2c02478 100644 --- a/src/layouts/PostLayout.astro +++ b/src/layouts/PostLayout.astro @@ -17,23 +17,37 @@ const { title, description, ogImage, canonicalURL, pubDatetime, modDatetime } = const commentPath = Astro.url.pathname; -const structuredData = { /* ...保持不变... */ }; +// 结构化数据(保持你原来的实现,此处仅作示例) +const structuredData = { + "@context": "https://schema.org", + "@type": "Article", + headline: title, + description: description, + // ... 其他字段按你的原有逻辑填充 +}; --- - {pubDatetime && } - {modDatetime && } + {pubDatetime && ( + + )} + {modDatetime && ( + + )}