Skip to content

jammeryhq/gridsome-remark-classes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast-track your JAMstack development & learning


About this plugin

Gridsome Remark plugin to add css classes to any element

Installation

npm install --save @jammeryhq/gridsome-remark-classes

# or

yarn add @jammeryhq/gridsome-remark-classes

How to use

//gridsome.config.js

module.exports = {

  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        typeName: 'Blog',
        path: './content/blog/**/*.md',
      }
    }
  ],

  transformers : {
    remark : {
      plugins : [
        ['@jammeryhq/gridsome-remark-classes', {
          'heading[depth=1]': 'title',
          'heading[depth=2]': 'subtitle',
          'paragraph': 'text-normal font-serif'
        }]
      ]
    }
  }
}

Documentation

You can find the complete documentation here: https://webstone.info/documentation/gridsome-remark-classes

Credits

Inspired by chrisg86/gatsby-remark-classes

Packages

No packages published

Languages

  • JavaScript 100.0%