Switched from DocumentTitle to the More Robust HelmetJS lib
This commit is contained in:
parent
94a2ab7ea3
commit
2b832d4b01
4 changed files with 42 additions and 35 deletions
7
html.js
7
html.js
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react'
|
||||
import DocumentTitle from 'react-document-title'
|
||||
import Helmet from "react-helmet"
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
import { GoogleFont, TypographyStyle } from 'react-typography'
|
||||
import typography from './utils/typography'
|
||||
|
|
@ -13,7 +13,7 @@ module.exports = React.createClass({
|
|||
},
|
||||
render () {
|
||||
const { body } = this.props
|
||||
const title = DocumentTitle.rewind()
|
||||
const head = Helmet.rewind();
|
||||
|
||||
let css
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
|
|
@ -29,7 +29,8 @@ module.exports = React.createClass({
|
|||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0"
|
||||
/>
|
||||
<title>{title}</title>
|
||||
{head.title.toComponent()}
|
||||
{head.meta.toComponent()}
|
||||
<TypographyStyle typography={typography} />
|
||||
<GoogleFont typography={typography} />
|
||||
{css}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue