aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/mentions-legales.tsx
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/mentions-legales.tsx
parent1fa8d8281371db25ef9382b6087b7f3c0db73fe3 (diff)
chore: add opengraph and twitter meta
Diffstat (limited to 'src/pages/mentions-legales.tsx')
-rw-r--r--src/pages/mentions-legales.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pages/mentions-legales.tsx b/src/pages/mentions-legales.tsx
index e7da49a..ac587f0 100644
--- a/src/pages/mentions-legales.tsx
+++ b/src/pages/mentions-legales.tsx
@@ -28,12 +28,13 @@ const LegalNotice: NextPageWithLayout = () => {
const pageMeta: ArticleMeta = {
dates,
};
+ const pageUrl = `${config.url}${router.asPath}`;
const publicationDate = new Date(dates.publication);
const updateDate = new Date(dates.update);
const webpageSchema: WebPage = {
- '@id': `${config.url}${router.asPath}`,
+ '@id': `${pageUrl}`,
'@type': 'WebPage',
breadcrumb: { '@id': `${config.url}/#breadcrumb` },
name: seo.legalNotice.title,
@@ -41,7 +42,7 @@ const LegalNotice: NextPageWithLayout = () => {
inLanguage: config.locales.defaultLocale,
license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr',
reviewedBy: { '@id': `${config.url}/#branding` },
- url: `${config.url}${router.asPath}`,
+ url: `${pageUrl}`,
isPartOf: {
'@id': `${config.url}`,
},
@@ -61,7 +62,7 @@ const LegalNotice: NextPageWithLayout = () => {
editor: { '@id': `${config.url}/#branding` },
inLanguage: config.locales.defaultLocale,
license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr',
- mainEntityOfPage: { '@id': `${config.url}${router.asPath}` },
+ mainEntityOfPage: { '@id': `${pageUrl}` },
};
const schemaJsonLd: Graph = {
@@ -74,6 +75,10 @@ const LegalNotice: NextPageWithLayout = () => {
<Head>
<title>{seo.legalNotice.title}</title>
<meta name="description" content={seo.legalNotice.description} />
+ <meta property="og:url" content={`${pageUrl}`} />
+ <meta property="og:type" content="article" />
+ <meta property="og:title" content={t`Legal notice`} />
+ <meta property="og:description" content={intro} />
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schemaJsonLd) }}