mirror of
https://github.com/netbirdio/docs.git
synced 2026-09-28 17:59:05 +02:00
Harden last-updated dates: CI guard, SEO metadata, View history link (#904)
This commit is contained in:
@@ -30,6 +30,7 @@ function AppInner({ Component, pageProps }) {
|
||||
let router = useRouter()
|
||||
let tableOfContents = collectHeadings(pageProps.sections)
|
||||
const { isAccepted } = useCookieConsent()
|
||||
const lastUpdated = pageProps.lastUpdated
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -41,6 +42,21 @@ function AppInner({ Component, pageProps }) {
|
||||
<title>{`${pageProps.title} - NetBird API`}</title> : <title>{`${pageProps.title} - NetBird Docs`}</title>
|
||||
}
|
||||
<meta name="description" content={pageProps.description} />
|
||||
{lastUpdated && <meta property="article:modified_time" content={lastUpdated} />}
|
||||
{lastUpdated && (
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'TechArticle',
|
||||
headline: pageProps.title,
|
||||
description: pageProps.description,
|
||||
dateModified: lastUpdated,
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Head>
|
||||
<AnnouncementBannerProvider>
|
||||
<MDXProvider components={mdxComponents}>
|
||||
|
||||
Reference in New Issue
Block a user