Fix shareable url

This commit is contained in:
prototypa
2022-11-07 17:42:09 -05:00
parent 570900c4cb
commit 801b4fd01b
2 changed files with 5 additions and 5 deletions

View File

@ -23,12 +23,12 @@ export async function getStaticPaths() {
}
const { post } = Astro.props;
const canonical = post.canonical || getCanonical(getPermalink(post.slug, 'post'));
const url = getCanonical(getPermalink(post.slug, 'post'));
const meta = {
title: `${post.title} — ${SITE.name}`,
description: post.description,
canonical: canonical,
canonical: post.canonical || url,
image: await findImage(post.image),
ogTitle: post.title,
ogType: 'article',
@ -36,5 +36,5 @@ const meta = {
---
<Layout {meta}>
<SinglePost post={{ ...post, image: meta.image }} canonical={canonical} />
<SinglePost post={{ ...post, image: meta.image }} url={url} />
</Layout>