Re: Guard plugin for Asciidoctor
Posted by
mojavelinux on
Mar 18, 2013; 3:17am
URL: https://discuss.asciidoctor.org/Guard-plugin-for-Asciidoctor-tp53p60.html
Paul,
This is excellent!
I gave it a run through and came up with some ideas for how to honor Asciidoctor options. I think it's as simple as forwarding the guard options on to Asciidoctor.
If overrides are needed per document, they can always be set in the document itself. To make that easier, I've assigned the attribute 'guard' so that you can do conditional inclusion, such as:
ifdef::guard[]
:stylesheet: my-test-stylesheet.css
endif::guard[]
Here's the pull request with my changes:
With this changes in place, using the plugin as as simple as:
.Guardfile
----
guard :asciidoc
----
Voila!
-Dan
--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597