Next.js Discord

Discord Forum

Dynamic metadata on build time with generateStaticParams

Unanswered
Vansh Bordia posted this in #help-forum
Open in Discord
I tried using generateStaticParams with generateMetadata in an async page.
The page has dynamic data as such it only updates on builds not required to actually fetch so the pages can be statically built. But I want to generate title for these pages and generateMetadata does not seem to work with generateStaticParams. Is there a workaround or some way I can export the pages with the metadata fetched from database (get the values and create in the function)
I am not using export (I have other pages/ routes that render dynamically, these paegs are statically exported )

0 Replies