aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/thematique
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-19 15:50:23 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-19 15:50:23 +0100
commita16d23dcde76874fab4b6bdb45067fd01b88cdc1 (patch)
tree540cfed27a1200ed6bdbc3a445d6dd8a4dc969fb /src/pages/thematique
parent1fa8d8281371db25ef9382b6087b7f3c0db73fe3 (diff)
chore: add opengraph and twitter meta
Diffstat (limited to 'src/pages/thematique')
-rw-r--r--src/pages/thematique/[slug].tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx
index 1964146..93b1221 100644
--- a/src/pages/thematique/[slug].tsx
+++ b/src/pages/thematique/[slug].tsx
@@ -51,9 +51,10 @@ const Thematic: NextPageWithLayout<ThematicProps> = ({ thematic }) => {
const meta: ArticleMeta = {
dates: thematic.dates,
};
+ const thematicUrl = `${config.url}${router.asPath}`;
const webpageSchema: WebPage = {
- '@id': `${config.url}${router.asPath}`,
+ '@id': `${thematicUrl}`,
'@type': 'WebPage',
breadcrumb: { '@id': `${config.url}/#breadcrumb` },
name: thematic.seo.title,
@@ -81,7 +82,7 @@ const Thematic: NextPageWithLayout<ThematicProps> = ({ thematic }) => {
inLanguage: config.locales.defaultLocale,
isPartOf: { '@id': `${config.url}/blog` },
license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr',
- mainEntityOfPage: { '@id': `${config.url}${router.asPath}` },
+ mainEntityOfPage: { '@id': `${thematicUrl}` },
subjectOf: { '@id': `${config.url}/blog` },
};
@@ -95,6 +96,10 @@ const Thematic: NextPageWithLayout<ThematicProps> = ({ thematic }) => {
<Head>
<title>{thematic.seo.title}</title>
<meta name="description" content={thematic.seo.metaDesc} />
+ <meta property="og:url" content={`${thematic}`} />
+ <meta property="og:type" content="article" />
+ <meta property="og:title" content={thematic.title} />
+ <meta property="og:description" content={thematic.intro} />
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schemaJsonLd) }}