Add basic Social Share buttons

This commit is contained in:
prototypa
2022-11-07 13:46:58 -05:00
parent 9746bf8a20
commit 000a99a3fc
4 changed files with 62 additions and 5 deletions

View File

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