feat: set og:type to article for posts (#183)

* New prop setOGTypeArticle sets og:type to "article" for posts, and "website" for every other page.

* Fixed error where I declared setOGTypeArticle twice.
This commit is contained in:
David V. Kimball
2024-09-16 22:35:58 -07:00
committed by GitHub
parent 44fb628737
commit 7a022cc190
3 changed files with 11 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ const jsonLd = {
// TODO include cover image here
}
---
<MainGridLayout banner={entry.data.image} title={entry.data.title} description={entry.data.description} lang={entry.data.lang}>
<MainGridLayout banner={entry.data.image} title={entry.data.title} description={entry.data.description} lang={entry.data.lang} setOGTypeArticle={true}>
<script is:inline slot="head" type="application/ld+json" set:html={JSON.stringify(jsonLd)}></script>
<div class="flex w-full rounded-[var(--radius-large)] overflow-hidden relative mb-4">
<div id="post-container" class:list={["card-base z-10 px-6 md:px-9 pt-6 pb-4 relative w-full ",