Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@canrau/gatsby-plugin-react-head

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canrau/gatsby-plugin-react-head

Gatsby plugin to setup up react-head and make it SSR ready

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gatsby-plugin-react-head

This plugin sets up react-head with server-rendering for you.

More about thread-safe meta tag management with react-head

Install

npm install --save react-head@next gatsby-plugin-react-head

Note

gatsby-plugin-react-head depends on react-head!
To use the new whitelist feature you have to specifically install react-head@next as shown above, the whitelist option hasn't been merged into the main release so far as it's still a proof of concept.

Configuration

Add the plugin to your gatsby-config.js.

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-react-head`,
      // optional options
      options: {
        // an array of whitelisted tags to disable `[data-rh]` attribute for them
        whitelist: [
          `title`,
          `[name="description"]`,
          `[property^="og:"]`,
          `[property^="fb:"]`,
        ],
      },
    },
  ],
}

Usage

import * as React from 'react';
import { Title, Link, Meta } from 'react-head';

const App = () => (
  <>
    <Title>GaiAma.org</Title>
    <Link rel="canonical" content="http://www.gaiama.org/" />
    <Meta name="description" content="Making rainforests cool againa" />
    // ...
  </>
);

License

MIT © Can Rau

Keywords

FAQs

Package last updated on 02 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc