Skip to content

asciidoctor/asciidoctor-backends

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asciidoctor Backends

In this repository, you’ll find an assortment of backend templates for generating different output formats from AsciiDoc that you can use with the template converter in Asciidoctor. These examples demonstrate how to make an html5 or docbook45 converter similar to the ones in Asciidoctor using purely templates, as well as how to use templates to generate HTML5 presentations from AsciiDoc.

Please note that these templates are only meant to be examples. They are not activately maintained, are not production ready, and are not intended to be a drop-in replacement for the official converters. They are provided merely as a reference and starting point for creating your own template-based converter.

Since the template converter in Asciidoctor works on a per-element basis, you can pull out one or more of these templates for customizing part of the HTML. Asciidoctor will drop back to the built-in converter to handle other elements in the document. You don’t have to feed in the whole directory of templates at once.

General Usage Instructions

Caution
These usage instructions are out of date, so follow with caution.
  1. Ensure Asciidoctor, Slim, Haml and their dependencies are installed:

    $ gem install asciidoctor tilt haml thread_safe
      gem install slim --version 2.1.0
    Warning
    The Slim-based templates are not yet compatible with Slim 3.
  2. Clone asciidoctor/asciidoctor-backends to get templates for rendering presentation HTML:

    $ git clone https://github.com/asciidoctor/asciidoctor-backends
  3. Edit CONTENT_FILE ( *.adoc or *.ad or …​):

    • Slides & content per slide

    • [Optional] Set presentation "options" at top of CONTENT_FILE. The options available & their values will depend on presentation library (some examples below).

      :${Attribute}: ${Value}
  4. Generate HTML from Asciidoctor templates:

    1. Command Line:

      $ asciidoctor -T TEMPLATE_DIRECTORY ${options} CONTENT_FILE
    2. Build Script: use Ruby, JavaScript, Gradle, or your favorite build tool/script with presentation options

  5. Copy or clone presentation library (to output destination/branch):

    $ git clone PRESENTATION_LIBRARY
Tip
If you are using GitHub Pages, plan ahead by keeping your source files on master branch and all output files on the gh-pages branch.
Table 1. Existing Backends Templates
Backend PRESENTATION_LIBRARY TEMPLATE_DIRECTORY

https://github.com/imakewebthings/deck.js

replaced by:
asciidoctor/asciidoctor-deck.js

https://github.com/hakimel/reveal.js

replaced by:
asciidoctor/asciidoctor-reveal.js

https://github.com/paulrouget/dzslides

asciidoctor-backends/slim/dzslides

https://github.com/markdalgleish/bespoke.js

asciidoctor-backends/slim/bespokejs

Note
Some backends may be broken out into new repositories in order to manage releases independently (and potentially publish separate gems). Aggregation of those releases back into this project may be delayed.

Copyright © 2012-2016 Dan Allen and the Asciidoctor Project. Free use of this software is granted under the terms of the MIT License.

See the LICENSE file for details.

About

Backends (i.e., templates) for Asciidoctor, a Ruby port of AsciiDoc.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published