1.1.0 • Published 4 years ago

frontformatter v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Test Semantic Release view on npm

Front Formatter

If you work with hugo, 11ty or any other static site generator, you'll likely end up with a lot of Markdown files after a while.

This script helps to migrate, add or remove properties from Markdwon frontmatter.

Usage

Specify a source folder or copy your markdown files into src. You can define properties to add and remove, then run the transformation function:

const frontformatter = require('frontformatter')

const addProperties = {
  add: 'this'
}
const removeProperties = ['remove']

frontformatter('src', addProperties, removeProperties)

Acknowledgments

Thanks to Jon Schlinkert for gray-matter

Licence

Licensed under MIT.