Next.js metadata title template
My main layout has the example shown in the next.js documentation
In my page routes I export the following boilerplate:
The page title stays as the default.
Please let me know what you think I should try, many thanks.
3 Replies
Hey, template strings are not used
just swap it with
backticks aren't required
I removed the backticks & it still doesn't work. Not sure what you mean by template strings are not used, are you saying template strings do not work?
NextJS Docs
https://nextjs.org/docs/app/api-reference/functions/metadata#metadata-fields
Functions: Metadata
Learn how to add Metadata to your Next.js application for improved search engine optimization (SEO) and web shareability.
Only works in server components