You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Head function and the Html function share the same context. The head metada available in the context should be available for both.
I know that head tags and html attributes are not the same kind of things. But from a user perspective, they land in the same category of the general document metadata things.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Easier setup for i18n and document metadata in SSR.
Non-Goals
No response
Background
There is a possible workaround with a middleware but this is super annoying to manage for something that should be super simple.
Proposal
I'm not sure but I would go threre :
https://github.com/vercel/next.js/blob/afddb6ebdade616cdd7780273be4cd28d4509890/packages/next/src/pages/_document.tsx#LL1193C12-L1193C12
If we have
Inject it in the props as the first element tested in the conditionnal.
From what I understand from this :
next.js/packages/next/src/pages/_document.tsx
Line 677 in afddb6e
The Head function and the Html function share the same context. The head metada available in the context should be available for both.
I know that head tags and html attributes are not the same kind of things. But from a user perspective, they land in the same category of the general document metadata things.
Beta Was this translation helpful? Give feedback.
All reactions