Gatsby Book Launch

“The missing guide to the modern web” launches on Thursday, Sep 29th: Modular: The Web’s New Architecture

ContactSign Up for Free
Community Plugin
View plugin on GitHub

@slixites/gatsby-plugin-google-fonts

Build Status Known Vulnerabilities codecov Dependencies

How to use it ?

yarn add @slixites/gatsby-plugin-google-fonts
// or
npm install --save @slixites/gatsby-plugin-google-fonts

Add fonts to your gatsby-config.js:

module.exports = {
  // ...
  plugins: [
    // ...
    {
      resolve: '@slixites/gatsby-plugin-google-fonts',
      options: {
        fonts: [
          'Montserrat',
          'source sans pro\:300,400,400i,700',
        ],
        display: 'swap',
        preconnect: true,
        attributes: {
            rel: 'stylesheet preload prefetch',
            as: 'style',
        },
      },
    },
    // ...
  ]
  // ...
}

How to find great ideas ?

© 2022 Gatsby, Inc.