snowdrop / team

Repository hosting daily tasks, general information, wiki, tricks, ...
3 stars 0 forks source link

asciidoc sample with tagged bash script #914

Open jacobdotcosta opened 1 year ago

jacobdotcosta commented 1 year ago

The tags aren't taken into account when rendering from asciidoc either into docbook or html.

The problem seems to be the asciidoc package.

asciidoc.noarch : Text based document generation
jacobdotcosta commented 1 year ago

Testing with asciidoctor (rubygem-asciidoctor.noarch : A fast, open source AsciiDoc implementation in Ruby) it does take into account the tags.

$ asciidoctor -b docbook5 README.adoc 
$ pandoc --highlight-style=pygments -f docbook -t markdown-backtick_code_blocks README.xml -o README.2.md

Does render a markdown with only, although some information, such as image and source code titles, are interpreted incorrectly.

image.png

...should be...

image.png

jacobdotcosta commented 1 year ago

Sections (L2 and L3 at least) include both the titme as well as the section id.

image.png

jacobdotcosta commented 1 year ago

Exporting the document with asciidoctor directly to html format shows a well presented document.

$ asciidoctor -b html5 README.adoc

image.png

cmoulliard commented 1 year ago

This is also what I did some years ago when I developed litoria and hyla tools able to generate from asciidoctor HTML generated documentation ;-)

Thee is also another option which is using github action to enhance the markdown or ascidoctor by looking to the snippet code and performing a find/replace. This is not also super convenient but at least we can continue to consult the content of the README on the github repo without the need to generate HTML and publish it somewhere (= where ???).