astrolib icon indicating copy to clipboard operation
astrolib copied to clipboard

Tags rendered before charset

Open FlorianWerndl opened this issue 2 years ago • 2 comments

Hi, as far as I can see all tags are rendered on top of head section. Afaik the <meta charset="" /> Tag should appear before other tags and e.g. lighthouse test will complain about this. Any possibility to avoid or change this behavior?

FlorianWerndl avatar May 30 '23 09:05 FlorianWerndl

I'm finding the same issue, the seo tags are all being rendered outside the

leading to an invalid HTML page and broken charset declaration.

verisgit avatar Dec 26 '23 14:12 verisgit

Actually, the issue was the theme author had structured the layout in a way that the SEO component was being injected prior to the HTML

tag.

Make sure your head component includes a slot and then you can pass the AstroSeo content into it as follows:

<AstroSeo
***your astroseo content***
/>
</HeadComponent>
<OtherComponent1 />
<OtherComponent2 />

verisgit avatar Dec 26 '23 15:12 verisgit