nodejs.dev icon indicating copy to clipboard operation
nodejs.dev copied to clipboard

Replace gatsby-plugin-react-helmet with native Gatsby Head

Open nschonni opened this issue 3 years ago • 3 comments

Enter your suggestions in details:

During building, there is a warning now, because the functionaity is now built into Gatsby

warning gatsby-plugin-react-helmet: Gatsby now has built-in support for modifying the document head. Learn more at https://gatsby.dev/gatsby-head

Seems like the SEO section that uses it currently also has some updated guidance on the Gatsby docs

nschonni avatar Sep 19 '22 03:09 nschonni

@nschonni we actually use the built-in feature from Gatsby. As you can see we don't even import the react-helmet plugin.

The issue here is that one of our plugins has the react-helmet as a dependency on their "package.json", I think that's why Gatsby's build is complaining.

But we're actually not using it.

ovflowd avatar Sep 19 '22 08:09 ovflowd

https://github.com/nodejs/nodejs.dev/blob/2cfa1b721d4550a9215caa31148161e1518075ca/src/components/Seo/index.tsx#L2

nschonni avatar Sep 19 '22 14:09 nschonni

@nschonni there's nothing wrong with that line. Again, what I was telling you, is that we don't use the gatsby-react-helmet plugin, which is correct.

We still, yes need to move to what they introduced on 4.19.0 (which is quite recent).

ovflowd avatar Sep 19 '22 14:09 ovflowd

Is this issue open or not? And please do tell what is to be done?

mstomar698 avatar Sep 30 '22 16:09 mstomar698

The issue is open. It's literally on its title. What needs to be done is basically remove the usage of react-helmet.

But it needs testing if it will work out of the box

ovflowd avatar Sep 30 '22 16:09 ovflowd

ok

mstomar698 avatar Oct 01 '22 04:10 mstomar698

@nschonni I made some research, and accomplishing this will be rather harder than easy. Removing Hacktoberfest label as this is not a straightforward issue.

ovflowd avatar Oct 01 '22 13:10 ovflowd