-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-ssr.js
23 lines (17 loc) · 904 Bytes
/
gatsby-ssr.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.onRenderBody = function (_ref, pluginOptions) {
var setPostBodyComponents = _ref.setPostBodyComponents;
var debugConfigLine = typeof pluginOptions.talkyardDebug === 'undefined' ? '' : `talkyardDebug = ${pluginOptions.talkyardDebug};\n`;
return setPostBodyComponents([_react2.default.createElement('script', {
key: `gatsby-plugin-talkyard-server-url`,
dangerouslySetInnerHTML: {
__html: `
talkyardServerUrl = '${pluginOptions.talkyardServerUrl || ''}';
talkyardScriptUrl = '${pluginOptions.talkyardScriptUrl || ''}';
${debugConfigLine}`
} })]);
}; /** Copyright (c) 2017-2018 Kaj Magnus Lindberg. License: MIT. */
// This import is required although React seemingly not used here.