Add class names to markdown generated html in VuePress
Branch: master
Clone or download
Latest commit e709ab6 Feb 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add all default Markdown rules Feb 10, 2019
.babelrc Init blud Feb 10, 2019
.editorconfig Init blud Feb 10, 2019
.gitignore Init blud Feb 10, 2019
package.json 1.0.1 Feb 10, 2019
readme.md Update readme.md Feb 20, 2019
rollup.config.js Init blud Feb 10, 2019

readme.md

VuePress Plugin to add unique class names to markdown generated html

Additional information about this Plugin can be found at https://www.marcomark.net/code/vuepress/markdown-classes.html

Example

<p class="md-paragraph_open">Vuepress</p>

Installation

npm i @silvanite/vuepress-plugin-markdown-classes

Load the plugin inside your config.js or in your theme's index.js

module.exports = {
    ...
    "plugins": [
        "@silvanite/markdown-classes"
    ]
}

Configuration options

You can overwrite the default configuration if required

module.exports = {
    ...
    "plugins": [
        ["@silvanite/markdown-classes", {
            "prefix": "md",
            "rules": [
                'blockquote_open',
                'bullet_list_open',
                'code_block',
                'hardbreak',
                'heading_open',
                'hr',
                'html_block',
                'html_inline',
                'image',
                'link_open',
                'ordered_list_open',
                'paragraph_open',
                'softbreak',
                'table_open',
            ]
        }]
    ]
}

Support

If you experience any problems with this VuePress Plugin please open a new issue or get in touch on Twitter @m2de_io. Or just look me up anyway, I'd love to hear from you.