If you're going to hack on the output that Asciidoctor generates, I strongly recommend you do it by modifying these templates. They are central to the vision of Asciidoctor because they make it very easy and familiar to customize the output and give you the full power of Ruby under the covers to get the output you want.
I still need to commit some changes to the main Asciidoctor repository (targeted for the 0.1.1 release) in order to properly support these templates...so don't despair if you can't get them working yet. Once those changes are in, here's how you'll use the template sets.
If you are calling Asciidoctor via the API, you pass the value of the -T parameter shown above to the :template_dir option.
NOTE: If you are implementing a custom backend, you only have to implement the templates that you want to *override*. If a template is missing, Asciidoctor will fall back to the built-in template for that backend. (Unfortunately, this doesn't yet work for backends that Asciidoctor doesn't know about, like deckjs).
If you have questions about how to use the templates, feel free to post to this list.
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597