JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7262
  • Score
    100M100P100Q141876F
  • License Apache-2.0

Use react-helmet-async with Gatsby

Package Exports

  • gatsby-plugin-react-helmet-async
  • gatsby-plugin-react-helmet-async/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gatsby-plugin-react-helmet-async) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM package downloads Depfu Code size Repo size

gatsby-plugin-react-helmet-async

Description

Provides drop-in support for server rendering data added with React Helmet Async.

React Helmet Async is a component which lets you control your document head using their React component.

With this plugin, attributes you add in their component, e.g. title, meta attributes, etc. will get added to the static HTML pages Gatsby builds.

This is important not just for site viewers, but also for SEO — title and description metadata stored in the document head is a key component used by Google in determining placement in search results.

How to install

Replace yarn add with npm i if you're using npm, or pnpm add for pnpm:

yarn add react-helmet-async gatsby-plugin-react-helmet-async

react-helmet-async requires your react and react-dom to be at least 16.6.0. If they're older than that, you'll need to upgrade them:

yarn add react@^16.6.0 react-dom@^16.6.0

Using TypeScript

This package includes its own types, as do gatsby and react-helmet-async. To get types for the other packages, you'll need to install them separately:

yarn add -D @types/react @types/react-dom

How to use

Just add the plugin to the plugins array in your gatsby-config.js:

module.exports = {
    plugins: [`gatsby-plugin-react-helmet-async`]
};