Login  Register

Maven plugin and extensions

Posted by torngat on May 08, 2015; 9:20pm
URL: https://discuss.asciidoctor.org/Maven-plugin-and-extensions-tp3149.html

Hi,

I really hope that I'm not asking something that is obviously documented somewhere that I've simply missed.  If so, please forgive me.

I'm trying to add some tab navigation and accordion styling to a document getting rendered to HTML.  I've gotten fairly close with normal functionality, but I ultimately get stuck because I can't apply a style to the <ul> and <li> items directly.  It inevitably ends up being applied to a parent <div> or a child <p>.  Of course, I can achieve this using passthrough blocks, but it's pretty cumbersome and I'd like to factor that out of my document.

This leads me to think that a custom macro might be the way to go.  I don't know Ruby, but I imagine that I can learn from the examples https://github.com/asciidoctor/asciidoctor-extensions-lab/tree/master/lib sufficiently to get something going.  However, I have no idea how to get this to run using the maven Asciidoctor plugin which I'm using to render the document.  I couldn't figure out how to make the plugin aware of an extension.  I also don't know how to build/package an extension so that it's usable by the plugin?  

I'm sure it's because I'm just not finding/seeing the right documentation, so any pointer would be greatly appreciated.

Thanks!