remark-hugo-lint
v0.2.13
Published
Remark-based linter for Hugo
Downloads
19
Readme
remark-hugo-lint
Remark-based linter for markdown with Hugo-style shortcodes.
Example
import { promises } from 'fs'
import { Formatter } from '.'
const formatter = new Formatter({
tokens: [['[[', ']]']],
inlineMode: true,
markdownAttributes: ['title', 'alt', 'caption']
})
promises.readFile('in.md', 'utf8')
.then(code => formatter.format(code))
.then(clean => promises.writeFile('out.md', Buffer.from(clean)))
.then(() => console.log('Done!'))