Skip to content

chkal/metalsmith-asciidoctor

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

metalsmith-asciidoctor

npm version Build Status

Metalsmith plugin to transform AsciiDoc files to HTML using asciidoctor.js.

Installation

With npm:

npm install --save-dev metalsmith-asciidoctor

With yarn:

yarn add --dev metalsmith-asciidoctor

Usage

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

About

Metalsmith plugin to transform Asciidoc files to HTML

Resources

License

Stars

Watchers

Forks

Packages

No packages published