Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub route cannot inherit any tags in head tag which not present but in root head.tsx #43020

Closed
1 task done
Ryan2128 opened this issue Nov 17, 2022 · 2 comments
Closed
1 task done
Labels
bug Issue was opened via the bug report template. Metadata Related to Next.js' Metadata API.

Comments

@Ryan2128
Copy link

Ryan2128 commented Nov 17, 2022

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.13.1
npm: 8.1.2
Yarn: 1.22.19
pnpm: 7.14.2
Relevant packages:
next: 13.0.4-canary.3
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0

What browser are you using? (if relevant)

Chrome 107.0.5304.110

How are you deploying your application? (if relevant)

next dev

Describe the Bug

@timneutkens

Thanks for your work in #42904 , bug in 13.0.4-canary.3 version, /about-me route's head tag cannot inherit any tags which not present in head tag but in root head.tsx

/ route's Head.tsx

image

/about-me route's Head.tsx

image

/ route's head tag

image

/about-me route's head tag

image

Expected Behavior

Expected Behavior same as next/head component in v12.

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

The code needed to reproduce is above.

To Reproduce

  1. yarn dev
  2. switch route
  3. check the head tag
@Ryan2128 Ryan2128 added the bug Issue was opened via the bug report template. label Nov 17, 2022
@Ryan2128 Ryan2128 changed the title Sub route cannot extend any tags which not present in head tag but in root head.tsx Sub route cannot inherit any tags which not present in head tag but in root head.tsx Nov 17, 2022
@Ryan2128 Ryan2128 changed the title Sub route cannot inherit any tags which not present in head tag but in root head.tsx Sub route cannot inherit any tags in head tag which not present but in root head.tsx Nov 17, 2022
@balazsorban44
Copy link
Member

Hi, this is expected behavior. You can check out the documentation here: https://beta.nextjs.org/docs/api-reference/file-conventions/head#sharing-tags-across-multiple-routes

@balazsorban44 balazsorban44 added the Metadata Related to Next.js' Metadata API. label Dec 12, 2022
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. Metadata Related to Next.js' Metadata API.
Projects
None yet
Development

No branches or pull requests

2 participants