Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gatsby-plugin-google-fonts with all npm packages installed. Try it out:

var gatsbyPluginGoogleFonts = require("gatsby-plugin-google-fonts")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gatsby-plugin-google-fonts v1.0.1

Bring Google Fonts to Gatsby

gatsby-plugin-google-fonts

How to use it ?

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

Add some fonts to your gatsby-config.js:

module.exports = {
  siteMetadata: {
    title: `I like Google fonts`
  },
  plugins: [
    {
      resolve: `gatsby-plugin-google-fonts`,
      options: {
        fonts: [
          `limelight`,
          `source sans pro\:300,400,400i,700` // you can also specify font weights and styles
        ],
        display: 'swap'
      }
    }
  ]
}

How to find great ideas ?

  • https://fonts.google.com
  • http://fontpair.co/
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free