Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub


This is a fork of didierfranc/gatsby-plugin-google-fonts + an option to set custom attributes.

How to use it ?

yarn add gatsby-plugin-google-fonts-with-attributes
// or
npm i gatsby-plugin-google-fonts-with-attributes

Add some fonts to your gatsby-config.js:

module.exports = {
  siteMetadata: {
    title: `I like Google fonts`,
  plugins: [
      resolve: `gatsby-plugin-google-fonts-with-attributes`,
      options: {
        fonts: [
          `source sans pro\:300,400,400i,700`, // you can also specify font weights and styles
        display: "swap",
        attributes: {
          rel: "stylesheet preload prefetch",

How to find great ideas ?

© 2023 Gatsby, Inc.