-
Notifications
You must be signed in to change notification settings - Fork 62
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
🐛 BUG: BaseHead component in head section is putting scripts into body #389
Comments
One more thing: It seems like it has something to do with the Meta Pixel script in the BaseHead component. When I am taking it out, the scripts don't appear in the body tag anymore. Specifically the tag that comes along with the Pixel implementation seems to cause the error. When I am only deleting the tag, it solves the issue. Super weird, right? Thanks for looking into it! Best |
Could this issue have something to do with it: #225? Now, the compiler seems to process the noscript tags. But when using a Meta Pixel the src of the used image shouldn't be compiled, if I'm not mistaken. So I tried |
This is how the
|
Interesting! I think this is a compiler issue when |
MDN says that the |
I couldn't reproduce this using your reproduction @moritzlaube, but I could be missing something. Let me know if you still have this issue. |
What version of
astro
are you using?1.0.0-beta.27
Are you using an SSR adapter? If so, which one?
no
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
I have a BaseLayout component in which I am using a BaseHead component to pass my meta tags etc. Next to to that component I am using a named slot like to also Pass Social MEta Tags:
I then have a BlogPost component which usees the BaseLayout component and passes a Social Meta component like so:
This setup produces a weird issue where all my script tags from the BaseHead component are rendered into the body tag of the final html. This is an issue since early on (24 or so). I posted it on the Discord channel but never filed a bug report.
Check out the Stackblitz. Run it and open the DevTools.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-akxdgm-wqfikb?file=src/layouts/BlogPost.astro
Participation
The text was updated successfully, but these errors were encountered: