Middleman AsciiDoc (gem: middleman-asciidoc) is an extension for the Middleman static site generator that adds support for the AsciiDoc markup language using Asciidoctor.

Note
This extension is designed for Middleman >= 4.0.0. Prior to Middleman 4, AsciiDoc support was provided by Middleman out of the box.

Installation

If you’re just getting started, install the Middleman gem:

$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install middleman

then generate a new project:

$ middleman init MY_PROJECT

If you’re working with an existing project, you can skip the previous steps.

Finally, add gem 'middleman-asciidoc' to your Gemfile and run bundle.

Note
Each AsciiDoc file in the source directory (except files that begin with _ or are in a directory that begins with _) becomes a page in the site. AsciiDoc files can have the file extension .adoc or .html.adoc. These extensions are stripped and replaced with the value of the outfilesuffix attribute, which defaults to .html. (For details, see the discussion in issue #7).

Configuration

activate :asciidoc

You can also pass AsciiDoc configuration options to the underlying Asciidoctor processor:

activate :asciidoc, :attributes => %w(foo=bar)

The full set of options can be seen on your preview server’s config page at /__middleman/config/.

Community

The official community forum for Middleman can be found at http://forum.middlemanapp.com. For questions related to this extension or general questions about AsciiDoc, please post to the Asciidoctor discussion list at http://discuss.asciidoctor.org.

Bug reports

Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems at https://github.com/middleman/middleman-asciidoc/issues.

The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.

How to run Cucumber tests

  1. Clone the repository:

    $ git clone https://github.com/middleman/middleman-asciidoc.git && cd middleman-asciidoc
  2. Install Bundler (if not already installed):

    $ gem install bundler
  3. Run Bundler (from the project root) to install the gem dependencies:

    $ bundle
  4. Run test cases (based on Cucumber) using Rake:

    $ bundle exec rake cucumber

Copyright © 2014-2016 Dan Allen. Free use of this software is granted under the terms of the MIT License. For the full text of the license, see the LICENSE file.