We’re seeing some odd behaviour on the docs site and could do with a hand debugging!
A user reported that there was layout shift/FOUC when loading https://docs.astro.build/en/recipes/, which I can confirm. This only happens on that page and no other that I’ve tested.
I dug into why, and discovered that for some reason the HTML for that page has its stylesheets injected in the middle of the <body> content, instead of at the end of <head> like all other pages (see screenshot).
The .fluid-grid node where the hoisted styles are injected is coming from our <RecipesNav /> component and if I remove that component from recipes.mdx (https://github.com/withastro/docs/blob/main/src/content/docs/en/recipes.mdx) styles load as expected (i.e. injected into <head>).
I’m scratching my head to understand why this is happening. We use <RecipesNav /> in a .astro layout without seeing the same issue and follow the same nav-component-in-MDX pattern in our CMS, integrations, deploy, and migration guides without problems.
Anyone seen similar behaviour and been able to track down what’s happening?


