gatsby-plugin-google-fonts-with-attributes

1.0.8 • Public • Published

gatsby-plugin-google-fonts-with-attributes

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: [
          `limelight`,
          `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 ?

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.8
    138
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.8
    138
  • 1.0.7
    0
  • 1.0.6
    0
  • 1.0.5
    0
  • 1.0.4
    0

Package Sidebar

Install

npm i gatsby-plugin-google-fonts-with-attributes

Weekly Downloads

138

Version

1.0.8

License

MIT

Unpacked Size

4.47 kB

Total Files

6

Last publish

Collaborators

  • alekslario