Unable to custom tags to the meta tags on Nextra blog theme #1701
-
Hi 👋🏾 Trying to add custom tags to the theme header, but it is not working. Any help would be appreciated. head: (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Nextra" />
<meta property="og:description" content="The next site builder" />
</>
), Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Solved - https://nextra.site/docs/custom-theme#render-metadata-for-the-active-page |
Beta Was this translation helpful? Give feedback.
-
Hi @shawn-sandy, can you tell me how you configure the import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() {
const meta = {
title: 'Next.js Blog Starter Kit',
description: 'Clone and deploy your own Next.js portfolio in minutes.',
image: 'https://assets.vercel.com/image/upload/q_auto/front/vercel/dps.png'
}
return (
<Html lang="en">
<Head>
<meta name="robots" content="follow, index" />
<meta name="description" content={meta.description} />
<meta property="og:site_name" content={meta.title} />
<meta property="og:description" content={meta.description} />
<meta property="og:title" content={meta.title} />
<meta property="og:image" content={meta.image} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@yourname" />
<meta name="twitter:title" content={meta.title} />
<meta name="twitter:description" content={meta.description} />
<meta name="twitter:image" content={meta.image} />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
} |
Beta Was this translation helpful? Give feedback.
Solved - https://nextra.site/docs/custom-theme#render-metadata-for-the-active-page