Next.js provides an useful set of utilities, allowing a flexible experience with Fumadocs.
Fumadocs uses the Next.js Metadata API for SEO.
Make sure to read their Metadata section for the fundamentals of Metadata API.
For docs pages, Fumadocs has a built-in metadata image generator.
You will need a route handler to get started.
We need to append og.png
to the end of slugs so that we can access it via /docs-og/my-page/og.png
.
In your docs page, add the image to metadata.
You can also customise the font, options for Satori are also available on the built-in generator.