asciidoctor / asciidoctor-gradle-examples

A collection of example projects that demonstrates how to use the Asciidoctor Gradle plugin
http://asciidoctor.github.io/asciidoctor-gradle-examples
Other
147 stars 136 forks source link

Add custom template example #39

Closed vogella closed 6 years ago

vogella commented 6 years ago

Via https://github.com/asciidoctor/asciidoctor/issues/2436 I learned from @mojavelinux that Asciidoc supports converter templates for influencing the HTML output. As far as I googled this feature is not (well) documented. It would be great to have a working example for the Gradle build so that we can "copy" it for our build.

cc @fap-

mojavelinux commented 6 years ago

You can find an example in the project that uses deck.js.

https://github.com/asciidoctor/asciidoctor-gradle-examples/blob/master/asciidoc-to-deckjs-example/build.gradle

It looks like this:

options template_dirs : [new File('templates/slim').absolutePath]

I recommend slim over haml, but the choice is yours. No extra dependencies are needed.

vogella commented 6 years ago

deckjs actually uses this. https://github.com/asciidoctor/asciidoctor-gradle-examples/blob/master/asciidoc-to-deckjs-example/build.gradle