Lullabot / gatsby-theme-adr

A Gatsby theme to generate a static site for ADRs
MIT License
12 stars 4 forks source link

feat: Replace react-helmet with Gatsby Head API #71

Closed huntermacd closed 1 year ago

huntermacd commented 1 year ago

This diff pulls react-helmet and the associated Gatsby-specific plugin gatsby-plugin-react-helmet out of the project, bumps the version of Gatsby to the newest v4 release (they're on v5 now) in order to add support for the Gatsby Head API, and replaces the bits of code that used react-hemet with bits of code that utilize Gatsby's Head API, which is the new preferred method.

Motivation: the gatsby-plugin-react-helmet plugin is causing issues for a client project and it's a soon-to-be-deprecated package anyway.

Note: eslint doesn't like it when you create an explicit children prop, but we need to preserve the existing functionality in the new Head function, so I added an ignore. Open to ideas of a more elegant way to accomplish this. Perhaps a unique prop name would allow for the same thing without the warning.

huntermacd commented 1 year ago

Hrm, yeah, good catch. Will revisit this later, then.

e0ipso commented 1 year ago

I opened a PR for this as well in #76.

e0ipso commented 1 year ago

This was fixed in #76.