27 lines
891 B
JavaScript
27 lines
891 B
JavaScript
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.onRenderBody = void 0;
|
|
|
|
var _reactHelmet = require("react-helmet");
|
|
|
|
var onRenderBody = function onRenderBody(_ref) {
|
|
var setHeadComponents = _ref.setHeadComponents,
|
|
setHtmlAttributes = _ref.setHtmlAttributes,
|
|
setBodyAttributes = _ref.setBodyAttributes;
|
|
|
|
var helmet = _reactHelmet.Helmet.renderStatic(); // These action functions were added partway through the Gatsby 1.x cycle.
|
|
|
|
|
|
if (setHtmlAttributes) {
|
|
setHtmlAttributes(helmet.htmlAttributes.toComponent());
|
|
}
|
|
|
|
if (setBodyAttributes) {
|
|
setBodyAttributes(helmet.bodyAttributes.toComponent());
|
|
}
|
|
|
|
setHeadComponents([helmet.title.toComponent(), helmet.link.toComponent(), helmet.meta.toComponent(), helmet.noscript.toComponent(), helmet.script.toComponent(), helmet.style.toComponent(), helmet.base.toComponent()]);
|
|
};
|
|
|
|
exports.onRenderBody = onRenderBody; |