1.1.2 • Published 8 years ago
metalsmith-asciidoctor v1.1.2
metalsmith-asciidoctor
Metalsmith plugin to transform AsciiDoc files to HTML using asciidoctor.js.
Installation
With npm:
npm install --save-dev metalsmith-asciidoctorWith yarn:
yarn add --dev metalsmith-asciidoctorUsage
var asciidoctor = require("metalsmith-asciidoctor");
Metalsmith(__dirname)
/* ... */
.use(asciidoctor())
/* ... */By default, the plugin will process all .adoc files and render them to HTML. You can customize this
default behavior by setting the pattern property on a configuration object.
.use(asciidoctor({
pattern: "**/*.asciidoc"
}))You can also pass custom options to the asciidoctor.js by setting the options property. Please
note that this will also allow you to provide custom attributes.
.use(asciidoctor({
options: {
safe: "safe",
attributes: {
"note-caption": "Hinweis",
"warning-caption": "Warnung"
}
}
}))License
MIT