Fix page title

This commit is contained in:
braginini
2023-05-24 15:55:06 +02:00
parent fb44b6e529
commit 2f568f7c61

View File

@@ -23,12 +23,9 @@ export default function App({ Component, pageProps }) {
return ( return (
<> <>
<Head> <Head>
{router.pathname === '/' ? ( {router.route.startsWith('/ipa') ?
<title>NetBird Docs</title> <title>{`${pageProps.title} - NetBird API`}</title> : <title>{`${pageProps.title} - NetBird Docs`}</title>
) : ( }
router.pathname.startsWith('/docs') ?
<title>{`${pageProps.title} - NetBird Docs`}</title> : <title>{`${pageProps.title} - NetBird API`}</title>
)}
<meta name="description" content={pageProps.description} /> <meta name="description" content={pageProps.description} />
</Head> </Head>
<MDXProvider components={mdxComponents}> <MDXProvider components={mdxComponents}>