We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d163724 commit 10c8227Copy full SHA for 10c8227
packages/gatsby/cache-dir/static-entry.js
@@ -443,6 +443,16 @@ export default async function staticPage({
443
444
postBodyComponents.push(...bodyScripts)
445
446
+ // Reorder headComponents so meta tags are always at the top and aren't missed by crawlers
447
+ // by being pushed down by large inline styles, etc.
448
+ // https://github.com/gatsbyjs/gatsby/issues/22206
449
+ headComponents.sort((a, b) => {
450
+ if (a.type && a.type === `meta`) {
451
+ return -1
452
+ }
453
+ return 0
454
+ })
455
+
456
apiRunner(`onPreRenderHTML`, {
457
getHeadComponents,
458
replaceHeadComponents,
0 commit comments