Login  Register

Re: Maven plugin and extensions

Posted by torngat on May 14, 2015; 7:17pm
URL: https://discuss.asciidoctor.org/Maven-plugin-and-extensions-tp3149p3209.html

Hi Dan,

mojavelinux wrote
First, it's important to understand that AsciidoctorJ bundles the necessary
gems you need to use Asciidoctor, so you don't need any gems on your
system. You don't even need Ruby. In fact, the gems on your system aren't
used by default (though there is a way to request that they be used).
Ok, that's what I thought and glad to have it confirmed.  :)

I didn't realize that I didn't need to include all of the slim templates.  I followed your suggestion and removed all but my new template, which I then kept as simple as possible.  And... drumroll... I got some of my things to work!  I'm sure it could be cleaned up, so if it's ever to be used as an example, I'll need it code-reviewed.  But I'll start a side conversation about this as I promised to contribute to the documentation.  :)

If I may abuse of your time and patience, I have a few more questions:

How are the slim templates resolved?  I feel like I've really usurped the meaning of "list" to achieve my goals and I think it would be better if I could encapsulate it in a better way.  I'm thinking that defining a new block type would be a better way to go, but is it possible to map a new block type to a slim template?

Also, is there any way to include an Asciidoctor snippet from a template?  For example, how could I get the equivalent of:
----
include::{generated}/response-fields.adoc[]
----
but from within a template.  Is there a call that I can make to the main code from the slim template to cause it to be imported?  

Finally,  how/where can I get started to help document some of this?

Thanks again!

Sebastien