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
Provide a way to identify which page is now rendering in layout.tsx in SSG (and also other) process(es), possible solutions are
declaring a global-access variable
passing path parameter to the props
add path property to children (React.ReactNode type)
Non-Goals
No response
Background
I couldn't find any way to find out which page is rendering and using layout.tsx in SSG process. I think there should be a way (setting a static variable for example, passing a prop, ...) to indicate that which page is now using layout.tsx. I want it specially in SSG process because it would affect SEO and I don't want to change it to SSR.
Proposal
I'm pleased to contribute, but I'm not sure if there is an existing solution or not. I also need any architectures of next.js to review this feature request and he/she would have better opinion about it.
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
Provide a way to identify which page is now rendering in layout.tsx in SSG (and also other) process(es), possible solutions are
path
parameter to the propspath
property to children (React.ReactNode type)Non-Goals
No response
Background
I couldn't find any way to find out which page is rendering and using layout.tsx in SSG process. I think there should be a way (setting a static variable for example, passing a prop, ...) to indicate that which page is now using layout.tsx. I want it specially in SSG process because it would affect SEO and I don't want to change it to SSR.
Proposal
I'm pleased to contribute, but I'm not sure if there is an existing solution or not. I also need any architectures of next.js to review this feature request and he/she would have better opinion about it.
Beta Was this translation helpful? Give feedback.
All reactions