Fumadocs, does not add description
metatag
#1446
Answered
by
nikitavoloboev
nikitavoloboev
asked this question in
Q&A
-
To ReproduceI didn't find docs on how to add metadata in fumadocs so I assumed you do it with this thing: import "./global.css"
import { RootProvider } from "fumadocs-ui/provider"
import { Inter } from "next/font/google"
import type { ReactNode } from "react"
import { Metadata } from "next"
const inter = Inter({
subsets: ["latin"],
})
export const metadata: Metadata = {
title: {
default: "nikiv.dev | personal site, docs, ui",
template: "%s | nikiv.dev",
},
description: "nikiv.dev | personal site, docs, ui",
metadataBase: new URL("https://nikiv.dev"),
openGraph: {
title: "nikiv.dev",
description: "nikiv.dev | personal site, docs, ui",
url: "https://nikiv.dev",
siteName: "nikiv.dev",
locale: "en_US",
type: "website",
},
robots: {
index: true,
follow: true,
},
}
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={inter.className} suppressHydrationWarning>
<body className="flex flex-col min-h-screen">
<RootProvider>{children}</RootProvider>
</body>
</html>
)
} however with above, the meta description is missing even though I put it. website: https://nikiv.dev Code is here: https://github.com/nikitavoloboev/nikiv.dev |
Beta Was this translation helpful? Give feedback.
Answered by
nikitavoloboev
Feb 19, 2025
Replies: 1 comment 5 replies
-
Because you didn't return it from the generate metadata function in your page. It's not handled by Fumadocs, you should refer to Next.js for SEO configurations |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok I am silly
had to do this:
const description = page.data.description || "Personal website, docs"