Use Gatby's new link prefixing format.
This commit is contained in:
parent
1043f18f0c
commit
8f1b58c801
3 changed files with 8 additions and 13 deletions
13
html.jsx
13
html.jsx
|
|
@ -1,21 +1,16 @@
|
|||
import React from 'react';
|
||||
import Typography from 'typography';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
|
||||
let TypographyStyle = new Typography().TypographyStyle;
|
||||
import { link } from 'gatsby-helpers'
|
||||
import { TypographyStyle } from 'utils/typography'
|
||||
|
||||
export default class Html extends React.Component {
|
||||
render() {
|
||||
let title, urlPrefix;
|
||||
let title;
|
||||
title = DocumentTitle.rewind();
|
||||
if (this.props.title) {
|
||||
title = this.props.title;
|
||||
}
|
||||
if ((typeof __GH_PAGES__ !== "undefined" && __GH_PAGES__ !== null) && __GH_PAGES__) {
|
||||
urlPrefix = this.props.config.ghPagesURLPrefix;
|
||||
} else {
|
||||
urlPrefix = "";
|
||||
}
|
||||
|
||||
return (
|
||||
<html lang="en">
|
||||
|
|
@ -46,7 +41,7 @@ export default class Html extends React.Component {
|
|||
</head>
|
||||
<body className="landing-page">
|
||||
<div id="react-mount" dangerouslySetInnerHTML={{__html: this.props.body}} />
|
||||
<script src={urlPrefix + "/bundle.js"}/>
|
||||
<script src={link("/bundle.js")}/>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue