Use canonical in posts in case you define

This commit is contained in:
prototypa
2022-08-26 18:14:00 -04:00
parent 0a7b84b816
commit fbc6a92c96

View File

@ -19,7 +19,7 @@ const { post } = Astro.props;
const title = `${post.title} — ${SITE.name}`;
const description = post.description;
const canonical = new URL(`blog/${post.slug}`, Astro.site);
const canonical = post.canonical || new URL(`blog/${post.slug}`, Astro.site);
const image = await findImage(post.image);
---