/** * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ const React = require("react"); // html head for each page class Head extends React.Component { render() { const links = this.props.config.headerLinks; let hasBlog = false; links.map(link => { if (link.blog) hasBlog = true; }); const highlightDefaultVersion = '9.12.0'; const highlightConfig = this.props.config.highlight || { version: highlightDefaultVersion, theme: 'default' }; const highlightVersion = highlightConfig.version || highlightDefaultVersion; const highlightTheme = highlightConfig.theme || 'default'; const hasCustomScripts = this.props.config.scripts; return ( {this.props.title} {this.props.config.noIndex && } {this.props.config.ogImage && ( )} {this.props.redirect && ( {this.props.config.algolia && ( )} {hasBlog && ( )} {hasBlog && ( )} {/* Site defined code. Keep these at the end to avoid overriding. */} {hasCustomScripts && this.props.config.scripts.map(function(source) { return (