eleventy-plugin-asciidoc

    1.3.0 • Public • Published

    eleventy-plugin-asciidoc

    Eleventy plugin to add support for AsciiDoc. You don't need to use to shortcodes. You can directly use AsciiDoc files (.adoc), just like Markdown (.md).

    The plugin uses Asciidoctor.js under the hood.

    Requires Eleventy 1.0.0-beta.10, 1.0.0-canary.50 or newer.

    Features

    • Supports the default YAML front matter.
    • Supports AsciiDoc document title
    • Other attributes in the AsciiDoc files are made available through page.asciidocAttributes.
      • Example :author: Jane Doe in the .adoc file will be available as page.asciidocAttrbutes.author

    Usage

    Install

    npm install eleventy-plugin-asciidoc

    Add to Configuration File

    Usually .eleventy.js:

    const eleventyAsciidoc = require("eleventy-plugin-asciidoc");
    
    module.exports = function (eleventyConfig) {
      eleventyConfig.addPlugin(eleventyAsciidoc);
    };

    Customize with Options

    You can pass options to convert() of Asciidoctor.js as second argument in addPlugin(). These are the available options.

    const eleventyAsciidoc = require("eleventy-plugin-asciidoc");
    
    module.exports = function (eleventyConfig) {
      eleventyConfig.addPlugin(eleventyAsciidoc, {
        showtitle: true /* Default value: true */,
        safe: "unsafe" /* Default value: undefined */,
      });
    };

    Install

    npm i eleventy-plugin-asciidoc

    DownloadsWeekly Downloads

    16

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    6.42 kB

    Total Files

    6

    Last publish

    Collaborators

    • saneef