Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nicorikken
Copy link
Contributor

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.

Based on the previous PR's #191 and #193

I'm very interested to hear your comments on this work:

  • Is the collect-images task the right way to collect images after the content-task function?
  • The asciidoctor* now has a global switch on diagram to determine whether or not asciidoctor-diagram is enabled. Is this correct?
  • Is there a way I can move both the images and the post with the 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 named imagesdir 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.

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.
@nicorikken nicorikken mentioned this pull request Sep 7, 2017
@nicorikken
Copy link
Contributor Author

I hope somebody will take a look at this PR, as it feels like a significant milestone to me.

@bhagany
Copy link
Contributor

bhagany commented Oct 21, 2017

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?

Copy link
Member

@podviaznikov podviaznikov left a 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

@allentiak
Copy link
Contributor

Hi, @nicorikken!
Still working on this? What do you think about @podviaznikov's suggestion?

Copy link
Contributor

@allentiak allentiak left a 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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants