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

Misplacement of head content in nested .astro components rendered from content collection MDX. #6214

Closed
1 task
angelokeirsebilck opened this issue Feb 10, 2023 · 3 comments · Fixed by #6216
Closed
1 task
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@angelokeirsebilck
Copy link

What version of astro are you using?

2.0.10

Are you using an SSR adapter? If so, which one?

Vercel adapter but same problem in Node adapter

What package manager are you using?

yarn

What operating system are you using?

Mac

Describe the Bug

This repo uses vercel adapter but the same bug occurs when using node adapter.

Rendering nested .astro components misplaces the head links inside the body (right after where you import the nested component)

image

First component in .mdx: https://github.com/angelokeirsebilck/mdx-collection-vercel-head-misplacement/blob/main/src/content/blog/bug.mdx?plain=1#L10

nested astro component: https://github.com/angelokeirsebilck/mdx-collection-vercel-head-misplacement/blob/main/src/components/blocks/home/HomeBanner.astro#L14

Live example: https://mdx-collection-vercel-head-misplacement.vercel.app/blog/bug/

Link to Minimal Reproducible Example

https://github.com/angelokeirsebilck/mdx-collection-vercel-head-misplacement

Participation

  • I am willing to submit a pull request for this issue.
@matthewp matthewp self-assigned this Feb 10, 2023
@matthewp matthewp added the - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) label Feb 10, 2023
@matthewp
Copy link
Contributor

Fixed in #6214

@matthewp
Copy link
Contributor

You can try this out with:

npm install astro@next--headbody

@angelokeirsebilck
Copy link
Author

Can confirm that this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants