From 85e5e849899b62599c4442766a52379f9f5edff2 Mon Sep 17 00:00:00 2001 From: lora <3526039967@qq.com> Date: Tue, 15 Sep 2026 08:53:14 +0800 Subject: [PATCH 1/2] fix(seo): add metadata to English writing aliases --- src/pages/en/writing/[...id].astro | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/en/writing/[...id].astro b/src/pages/en/writing/[...id].astro index fb6e8640..f2bffeba 100644 --- a/src/pages/en/writing/[...id].astro +++ b/src/pages/en/writing/[...id].astro @@ -6,23 +6,24 @@ export const prerender = true export async function getStaticPaths() { return (await getBlogCollection()).map((post) => ({ params: { id: post.id }, - props: { title: post.data.title } + props: { title: post.data.title, description: post.data.description } })) } -interface Props { title: string } -const { title } = Astro.props +interface Props { title: string; description: string } +const { title, description } = Astro.props const base = import.meta.env.BASE_URL.replace(/\/$/, '') const destination = `${base}/blog/${Astro.params.id}` const canonical = new URL(destination, Astro.site) --- - +