gatsby-plugin-glaze

0.5.0 • Public • Published

🍩 gatsby-plugin-glaze

Applies glaze theming on Gatsby sites.

📚 Usage

  1. 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
  2. Add newly installed plugins to gatsby-config.js:

    module.exports = {
      plugins: ['gatsby-plugin-glaze', 'gatsby-plugin-treat'],
    };
  3. 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',
  ],
};

Dependents (0)

Package Sidebar

Install

npm i gatsby-plugin-glaze

Weekly Downloads

3

Version

0.5.0

License

MIT

Unpacked Size

7.1 kB

Total Files

7

Last publish

Collaborators

  • kripod