Community Plugin
View plugin on GitHub🍩 gatsby-plugin-glaze
Applies glaze theming on Gatsby sites.
📚 Usage
-
Install the package and its peer dependencies along with the Gatsby plugin for treat:
npm install gatsby-plugin-glaze glaze treat react-treat gatsby-plugin-treat
-
Add newly installed plugins to
gatsby-config.js
:module.exports = { plugins: ['gatsby-plugin-glaze', 'gatsby-plugin-treat'], };
-
Override the default theme, as shown through an example project:
/* src/gatsby-plugin-glaze/theme.treat.js */ import { createTheme, defaultTokens } from 'glaze'; export default createTheme({ ...defaultTokens, // Customization... });
⚙️ Options
Additional configuration can be specified using Gatsby plugin options:
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-glaze',
options: {
// Reduce client runtime size by omitting style generation on the fly
disableStyleInjection: true,
},
},
,
'gatsby-plugin-treat',
],
};