gatsby-plugin-react-helmet
Advanced tools
Comparing version 1.0.0-alpha16-alpha.4482ff94 to 1.0.0-alpha17
"use strict"; | ||
var _extends2 = require("babel-runtime/helpers/extends"); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _objectWithoutProperties2 = require("babel-runtime/helpers/objectWithoutProperties"); | ||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _reactHelmet = require("react-helmet"); | ||
@@ -18,8 +10,5 @@ | ||
exports.onRenderBody = function (_ref, pluginOptions) { | ||
var headComponents = _ref.headComponents, | ||
otherProps = (0, _objectWithoutProperties3.default)(_ref, ["headComponents"]); | ||
var setHeadComponents = _ref.setHeadComponents; | ||
return (0, _extends3.default)({}, otherProps, { | ||
headComponents: headComponents.concat([_reactHelmet2.default.title.toComponent(), _reactHelmet2.default.meta.toComponent(), _reactHelmet2.default.link.toComponent()]) | ||
}); | ||
setHeadComponents([_reactHelmet2.default.title.toComponent(), _reactHelmet2.default.link.toComponent(), _reactHelmet2.default.meta.toComponent(), _reactHelmet2.default.noscript.toComponent(), _reactHelmet2.default.script.toComponent(), _reactHelmet2.default.style.toComponent()]); | ||
}; |
{ | ||
"name": "gatsby-plugin-react-helmet", | ||
"version": "1.0.0-alpha16-alpha.4482ff94", | ||
"version": "1.0.0-alpha17", | ||
"description": "Stub description for gatsby-plugin-react-helmet", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# gatsby-plugin-react-helmet | ||
Stub README | ||
Provides drop-in support for server rendering data added with [React | ||
Helmet](https://github.com/nfl/react-helmet). | ||
React Helmet 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. | ||
## Install | ||
`npm install --save gatsby-plugin-react-helmet` | ||
## How to use | ||
Just add the plugin to the plugins array in your `gatsby-config.js` | ||
```javascript | ||
plugins: [ | ||
`gatsby-plugin-react-helmet`, | ||
] | ||
``` |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2319
25
9
1