Skip to content

New plugin: Asciidoctor #49

@nicorikken

Description

@nicorikken

I'm working on an Asciidoc parser using Asciidoctor. The Ruby commands are run in boot-jruby. As it is being used for documentation, the intention is to use the diagram back-end for generating PlantUML and Graphviz images to be included in the final doc. Generating pdf versions on the side would be another option, but in my opinion this goes beyond the goals of Perun.

I have a couple of points worth discussing:

  1. One of our current documents has too many characters to be handled in the eval statement when handling pods (concerning the render stage currently). I'm considering a file-based solution for HTML inclusion. So the Asciidoctor plugin would generate a (partial) HTML file and adds the referred filename in say a :include key in the metadata. This allows pages to refer to this file, rather than load the value from the :content key. This slurp could also be handled within the Asciidoctor plugin to end up with a similar behavior as say the Markdown plugin.
  2. Asciidoc offers several built-in attributes to handle metadata. I plan on parsing the Asciidoc file to extract these attributes and include these into the metadata to be reference.
  3. Asciidoc offers the ability to evaluate the file for different inline inclusion macros. My use-case uses these ifdef statements to include code examples for different languages. We intend to generate the document for these different attributes. This evaluation could be done by parsing all ifdef commands and just evaluating all options. A more conservative way would be to either include the attributes in the plugin call, and/or announcing the desired evaluation attributes in a commented asciidoc file header.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions