-
Preliminary Checks
DescriptionI am attempting to migrate a project to use the new Head API. On build, there are 2 title tags in the HTML, the one from my SEO component and an empty one. <title data-react-helmet="true"></title> While my specified tag is <title data-gatsby-head="true">My Title</title> Reproduction Linkhttps://codesandbox.io/s/interesting-bardeen-9dk5z2?file=/src/pages/index.jsx Steps to Reproduce
Expected ResultSee only the title tag I specifed Actual ResultGet addition title tag which appears first & blocks my title EnvironmentSystem:
OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v16.16.0/bin/yarn
npm: 8.13.2 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Chrome: 103.0.5060.134
npmPackages:
gatsby: ^4.19.0 => 4.19.0
gatsby-awesome-pagination: ^0.3.8 => 0.3.8
gatsby-plugin-image: ^2.19.0 => 2.19.0
gatsby-plugin-sharp: ^4.19.0 => 4.19.0
gatsby-plugin-sitemap: ^5.19.0 => 5.19.0
gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.27 => 1.1.27
gatsby-source-filesystem: ^4.19.0 => 4.19.0
gatsby-theme-material-ui: ^5.2.0 => 5.2.0
gatsby-transformer-sharp: ^4.19.0 => 4.19.0 Config FlagsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
This happens because you use To be fair, we weren't aware of this limitation but it's also not something we'll spend time on fixing as we want people to move to the Head API. |
Beta Was this translation helpful? Give feedback.
This happens because you use
react-helmet
and the Head API in the same page. You have to use one of them, you can't use them together on the same page. When I removed the<Seo>
component fromsrc/pages/index.jsx
in your reproduction there was no empty title tag.To be fair, we weren't aware of this limitation but it's also not something we'll spend time on fixing as we want people to move to the Head API.