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

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


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.

AsciiDoc files in your site must have the file extension .html.adoc. Middleman will remove the .adoc part and write the converted output to the resulting file.


activate :asciidoc

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

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

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


The official community forum is available at: http://forum.middlemanapp.com

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
  2. Install Bundler (if not already installed):

    $ gem install bundler
  3. Run Bundler inside the project root to install the gem dependencies:

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

    $ rake cucumber


Copyright © 2014-2016 Dan Allen. MIT Licensed, see LICENSE for details.