#Metadata Template Title is not working

1 messages · Page 1 of 1 (latest)

lean mortar
#

I'm new to Next, and just started converting my SvelteKit project.
I initiated a Next project (next@15.2.0-canary.72) and created a basic layout.

But title.template in metadata title just do not work. I literally copypasted code from docs (https://nextjs.org/docs/app/api-reference/functions/generate-metadata#template) and all my pages show "Page" instead of "Page | Company" even though the template is "%s | Company".

Learn how to add Metadata to your Next.js application for improved search engine optimization (SEO) and web shareability.

forest quartzBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

lean mortar
#

Okay, I figured it out. It only works for pages in sub-routes, but doesn't work for a page.tsx in the same dir as layout.tsx. It doesn't seem to be mentioned in the docs so it might be worth adding there.