Replies: 1 comment 1 reply
-
Over a year and still no answer or fix... :( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
Background
This came up with regard to layouts, discussed in #43704.
My primary use case is a site with lots of mdx pages (100+), where most of the metadata could be generated automatically. Another use case is previous / next navigation, requiring individual URLs pulled from the server.
As far as I know there's no way to add elements to the
<head>
with app directory pages. Otherwise it would have been possible to use a layout with a client component, to at least add metadata that doesn't rely on server data (e.g. OpenGraph image URLs).Unfortunately it seems like metadata in templates doesn't work at all, at the moment.
generateMetadata
is called, but the results don't end up in the HTML. #46864Proposal
Make
params
andsearchParams
available to template components as well asgenerateMetadata
in template files. Since templates are, by definition, server-rendered for each page, this should be possible.Beta Was this translation helpful? Give feedback.
All reactions