diff --git a/lib/core/Head.js b/lib/core/Head.js index f8de01d4082c..b2485fe942a0 100644 --- a/lib/core/Head.js +++ b/lib/core/Head.js @@ -29,6 +29,11 @@ class Head extends React.Component { highlight.version }/styles/${highlight.theme}.min.css`; + // ensure the siteUrl variable ends with a single slash + const siteUrl = + (this.props.config.url + this.props.config.baseUrl).replace(/\/+$/, '') + + '/'; + return (
@@ -44,22 +49,14 @@ class Head extends React.Component { {this.props.config.ogImage && ( )} {this.props.config.twitterImage && ( )} {this.props.config.noIndex && } @@ -81,7 +78,7 @@ class Head extends React.Component { )} @@ -89,7 +86,7 @@ class Head extends React.Component { )}