diff --git a/.gitignore b/.gitignore index f023047..402463b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ public .DS_Store .intermediate-representation/ .cache/ -yarn.lock diff --git a/gatsby-config.js b/gatsby-config.js index 612b379..5b3107c 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -43,5 +43,9 @@ module.exports = { }, `gatsby-plugin-offline`, `gatsby-plugin-react-helmet`, + { + resolve: "gatsby-plugin-typography", + pathToConfigModule: "src/utils/typography", + }, ], } diff --git a/package.json b/package.json index 15d416c..acca786 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "gatsby-plugin-preact": "^1.0.0", "gatsby-plugin-react-helmet": "^1.0.0", "gatsby-plugin-sharp": "^1.6.0", + "gatsby-plugin-typography": "^1.7.2", "gatsby-remark-copy-linked-files": "^1.5.0", "gatsby-remark-images": "^1.5.0", "gatsby-remark-prismjs": "^1.2.0", @@ -25,10 +26,8 @@ "gatsby-transformer-sharp": "^1.6.0", "lodash": "^4.15.0", "react-responsive-grid": "^0.3.3", - "react-typography": "^0.16.1", "typeface-merriweather": "0.0.25", "typeface-montserrat": "0.0.24", - "typography": "^0.16.0", "typography-theme-wordpress-2016": "^0.15.1" }, "devDependencies": { diff --git a/src/html.js b/src/html.js deleted file mode 100644 index 04e0dd1..0000000 --- a/src/html.js +++ /dev/null @@ -1,50 +0,0 @@ -import React from 'react' -import { TypographyStyle } from 'react-typography' - -import typography from './utils/typography' - -let stylesStr -if (process.env.NODE_ENV === `production`) { - try { - stylesStr = require(`!raw-loader!../public/styles.css`) - } catch (e) { - console.log(e) - } -} - -export default class HTML extends React.Component { - render() { - let css - if (process.env.NODE_ENV === `production`) { - css = ( -