Closed mojavelinux closed 10 years ago
You enable the backend using:
$ asciidoctor -T slim -b packt book.adoc
Once you have the backend created, then you'll be able to use Groovy plugin to drive Asciidoctor as an alternative to using the asciidoctor command.
Thanks! I'll see how far I can get.
Excellent. If you get stuck, just let me know (ideally by posting to the list). I've done enough of these backends that they are practically second nature.
The trickiest part with slim is dealing with nested inline markup. Keep in mind that you always have the option of just using a long, interpolated Ruby string anywhere you want to. There's no rule that says that every tag must be represented in Slim's DSL hierarchy.
Here's the very start of a packt backend for use with Asciidoctor. I choose to use the slim template languages because it's the most concise language for creating XML output.
I've just done (most of) the document template so far. This covers the [header] and [footer] parts of the AsciiDoc Python backend. The next step is to do the paragraph block, then enable call to
=content
in the document template. Once you have these started, the rest should come quickly.