@wapps/gatsby-plugin-fonts
A Gatsby plugin to add google fonts or font library fonts to a gatsby site.
Installation
yarn add @wapps/gatsby-plugin-fonts
# npm install --save @wapps/gatsby-plugin-fonts
Usage
Edit gatsby-config.js
module.exports = {
plugins: [
{
resolve: `@wapps/gatsby-plugin-fonts`,
options: {
// Add any options here
},
},
],
}
Options
You can pass options to the plugin:
- googleFonts (Object [optional]): Default to undefined.
- fontLibrary (Array [optional]): Default to undefined.
For example:
options: {
googleFonts: {
families: [
'Montserrat:300,300i,400',
'Roboto:400,500,500i',
'Open Sans',
],
subsets: [
'greek',
]
},
fontLibrary: [
'unique',
'process'
]
}