You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to migrate my Nextra docs site to v4. I had a custom head element which would get the frontmatter from useConfig() and generate OpenGraph meta tags. From what I've understood, there is no way to get the frontmatter of the current page in a server component. If I make my Head a client component, I have to place it inside Layout because it provides the config context. However that is impossible.
Even if I don't include the meta tags that rely on frontmatter and manually append the – MyCompany suffix to every page title, but change it for the sidebar, etc., twitter can't generate a preview for my site, because it can't find a valid title or description.
Am I missing something in the docs? The only other possible solution I see would be creating a custom theme, but I'm using Nextra because it has a nice docs theme and should work well out of the box. Any ideas?
The text was updated successfully, but these errors were encountered:
Hello!
I'm trying to migrate my Nextra docs site to v4. I had a custom
head
element which would get the frontmatter fromuseConfig()
and generate OpenGraph meta tags. From what I've understood, there is no way to get the frontmatter of the current page in a server component. If I make myHead
a client component, I have to place it insideLayout
because it provides the config context. However that is impossible.My
Head
component should ideally look like this:Even if I don't include the meta tags that rely on frontmatter and manually append the
– MyCompany
suffix to every page title, but change it for the sidebar, etc., twitter can't generate a preview for my site, because it can't find a valid title or description.Am I missing something in the docs? The only other possible solution I see would be creating a custom theme, but I'm using Nextra because it has a nice docs theme and should work well out of the box. Any ideas?
The text was updated successfully, but these errors were encountered: