Add SEO meta to scambox articles

This commit is contained in:
Kevin Kandlbinder 2021-11-06 00:09:03 +00:00 committed by GitHub
parent a743342bd1
commit 49913942cb
2 changed files with 43 additions and 1 deletions

View file

@ -3,7 +3,7 @@ title: Harry Potter and the Toaster-Investment
url: harry-potter-and-the-toaster url: harry-potter-and-the-toaster
platform: telegram platform: telegram
tags: [crypto] tags: [crypto]
published: 2021-11-05 published: 2021-11-05 22:00:00
--- ---
I've recently been contacted by Hermine on Telegram with a big business opportunity, I've recently been contacted by Hermine on Telegram with a big business opportunity,

View file

@ -17,6 +17,47 @@ const ScamBoxPost = ({ data }) => {
<Layout <Layout
title={`${data.mdx.frontmatter.title} | ${t("scambox")}`} title={`${data.mdx.frontmatter.title} | ${t("scambox")}`}
description={data.mdx.excerpt} description={data.mdx.excerpt}
seoAdditional={
<script type="application/ld+json">
{JSON.stringify({
"@context": "https://schema.org",
"@type": "NewsArticle",
headline: data.mdx.frontmatter.title,
/*"image": [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
],*/
datePublished: data.mdx.publishedIso,
dateModified: data.mdx.publishedIso,
author: [
{
"@type": "Person",
name: "Kevin Kandlbinder",
url: "https://kevink.dev",
},
],
})}
</script>
}
meta={[
{
name: "og:type",
content: "article",
},
{
name: "article:published_time",
content: data.mdx.publishedIso,
},
{
name: "article:section",
content: "Scambox",
},
{
name: "keywords",
content: data.mdx.frontmatter.tags.join(", "),
},
]}
> >
<section className={styles.scamboxSection}> <section className={styles.scamboxSection}>
<article> <article>
@ -72,6 +113,7 @@ export const query = graphql`
tags tags
title title
published(formatString: "DD.MM.YYYY") published(formatString: "DD.MM.YYYY")
publishedIso: published(formatString: "")
} }
} }
locales: allLocale(filter: { language: { eq: $language } }) { locales: allLocale(filter: { language: { eq: $language } }) {