2.0.0 • Published 4 years ago
@fox-land/remark-insert v2.0.0
remark-insert
Generic utility that inserts a heading and the contents after it
Usage
import remark from 'remark'
import remarkInsert from '@fox-land/remark-insert'
remark()
// pass in either
.use(remarkInsert, {
headingText: 'Information',
headingDepth: 2,
insertionText: `Here is some information about x`,
})
.process({ path, contents })
.then((vfile) => {
console.info(vfile)
})
.catch((err: unknown) => {
console.error(err)
})
License
Licensed under Apache-2.0