mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-22 09:13:19 +01:00
load typekit the default way
This commit is contained in:
parent
5e20db2f72
commit
3d38f1d170
@ -14,8 +14,7 @@
|
||||
"gatsby-transformer-json": "^1.0.16",
|
||||
"react-helmet": "^5.2.0",
|
||||
"react-markdown": "^3.3.0",
|
||||
"react-transition-group": "^2.3.1",
|
||||
"webfontloader": "^1.6.28"
|
||||
"react-transition-group": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^8.2.3",
|
||||
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
||||
import Helmet from 'react-helmet'
|
||||
|
||||
const Head = ({ meta }) => {
|
||||
const { title, tagline, description } = meta
|
||||
const { title, tagline, description, typekit } = meta
|
||||
|
||||
return (
|
||||
<Helmet
|
||||
@ -11,6 +11,7 @@ const Head = ({ meta }) => {
|
||||
titleTemplate={`%s // ${title.toLowerCase()} { ${tagline.toLowerCase()} }`}
|
||||
>
|
||||
<meta name="description" content={description} />
|
||||
<link rel="stylesheet" href={`https://use.typekit.net/${typekit}.css`} />
|
||||
|
||||
<meta content="noindex,nofollow" name="robots" />
|
||||
</Helmet>
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import WebFont from 'webfontloader'
|
||||
import Head from '../components/atoms/Head'
|
||||
import Header from '../components/organisms/Header'
|
||||
import Footer from '../components/organisms/Footer'
|
||||
@ -13,8 +12,6 @@ const TemplateWrapper = ({ data, location, children }) => {
|
||||
return (
|
||||
<div className="app">
|
||||
<Head meta={meta} />
|
||||
{WebFont.load({ typekit: { id: meta.typekit } })}
|
||||
|
||||
<Header meta={meta} isHomepage={isHomepage} />
|
||||
|
||||
{children()}
|
||||
|
Loading…
Reference in New Issue
Block a user