-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: asciidoctor-diagram support #194
base: master
Are you sure you want to change the base?
Conversation
Adds metadata handling to the asciidoctor task. The asciidoctor task will now: 1. read asciidoctor attributes and add them as metadata 2. expose metadata to the asciidoctor process as attributes Both processes are executed independently from each other.
Enables `asciidoctor-diagram` support for generating images as defined inline in the source file. The resulting images are captured afterwards in a new task named `collect-images`, to stick to the basic content-task structure for the base asciidoctor task. Previous code was refactored to have stronger defaults for options and metadata handling.
I hope somebody will take a look at this PR, as it feels like a significant milestone to me. |
Hi Nico! Sorry for the slow responses lately. I'm trying to ramp back up on Perun after an unplanned break due to starting a new job. I'd like to get a handle on your asciidoctor PR's so that we can get them merged, but I'm a bit confused on where I should start to get an overall idea of what's going on. Can you point me in a direction? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me. Would you mind adding example site into the examples directory so that 1) people can see how to use it, 2) we can test it
Hi, @nicorikken! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Just to make @podviaznikov's feedback explicit.)
Enables
asciidoctor-diagram
support for generating images as defined inline in the source file. The resulting images are captured afterwards in a new task namedcollect-images
, to stick to the basic content-task structure for the base asciidoctor task.Previous code was refactored to have stronger defaults for options and metadata handling.
Based on the previous PR's #191 and #193
I'm very interested to hear your comments on this work:
collect-images
task the right way to collect images after thecontent-task
function?asciidoctor*
now has a global switch ondiagram
to determine whether or notasciidoctor-diagram
is enabled. Is this correct?permalink
task so the relative URL remains the same? Another way would be to fix this upfront, by giving each post it's own directory or by changing the relative URL namedimagesdir
in asciidoctor terminology.At the moment of writing you can observe the potential output at http://site.nicorikken.eu/posts/2017-08-14-testpost.html which is based on the source https://github.com/nicorikken/nicorikken.github.io/tree/perun which uses the code of this PR.