Skip to content

csmets/metalsmith-shortcode-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metalsmith Shortcode Parser

Build Status

Metalsmith wrapper for shortcode-parser

Since the other shortcodes for metalsmith no longer work or are for jade/pug templating only, I've had to create this.

Usage

npm install metalsmith-shortcode-parser
const shortcodes = require('metalsmith-shortcode-parser');

Metalsmith(__dirname)
    .use(shortcodes({
        files: ['.html', '.md'],
        shortcodes: {
            bold: function (buf, opts) {
                if (opts.upper) buf = buf.toUpperCase();
                return '<strong>' + buf + '</strong>';
            },
        },
    }))

About

Metalsmith wrapper for shortcode-parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published