-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
🐛 BUG: head contents placed in body when page has conditional head #2046
Copy link
Copy link
Closed
Milestone
Description
What version of astro are you using?
0.21.4
What package manager are you using?
npm
What operating system are you using?
mac
Describe the Bug
I found that my utf-8 encoding was not being applied correctly, and I traced it down to my head contents being placed inside the body instead of in the head. It occurs due to my page looking like this:
{redirect
? <head><meta http-equiv="refresh" content={`0; url=${redirect}`}></head>
: <Layout>
It’s a trap!
</Layout>
}
If I change the redirect to a normal layout or something, it works. So I suppose I just need to make another component to do the redirect. But I wanted to at least let y'all know this is happening.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-v7dk72?file=src/pages/index.astro
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels