<commit_before>ifndef::imagesdir[:imagesdir: ../images]
= generateHTML

image::ea/Manual/generateHTML.png[]

This is the standard asciidoctor generator which is supported out of the box.

The result is written to `build/docs/html5`.
The HTML files need the images folder in the same directory to be displayed the right way.

NOTE: if you would like to have a single-file HTML as result, you can configure asciidoctor to store the images inline as `data-uri`. +
Just set `:data-uri:` in the config of your AsciiDoc file. +
But be warned - such a file can be easily very big and some browsers might get into trouble rendering them. +
https://rdmueller.github.io/single-file-html/

== Text based Diagrams

For docToolchain, it is configured to use the http://asciidoctor.org/docs/asciidoctor-diagram/[asciidoctor-diagram] plugin which is used to create plantUML diagrams.

The plugin also supports a bunch of other text based diagrams, but http://plantuml.com/[plantUML] is the most used.

To use it, just specify your plantUML code like this:

....
.example diagram
[plantuml, "{plantUMLDir}demoPlantUML", png] # <1>
----
class BlockProcessor
class DiagramBlock
class DitaaBlock
class PlantUmlBlock

BlockProcessor <|-- DiagramBlock
DiagramBlock <|-- DitaaBlock
DiagramBlock <|-- PlantUmlBlock
----
....

<1> The element of this list specifies the diagram tool `plantuml` to be used. +
The second element the name of the image to be created and the third the image type.

NOTE: the \{plantUMLDir} ensures that plantUML also works for the <<generatePDF>> task.
Without it, <<generateHTML>> works fine, but the PDF will not find the generated images.

IMPORTANT: make sure to specify a unique image name for each diagram.
Otherwise it will be overwritten and you'll get all the same diagrams.

The above example renders as

.example diagram
[plantuml, "{plantUMLDir}demoPlantUML", png]
----
!pragma graphviz_dot jdot
class BlockProcessor
class DiagramBlock
class DitaaBlock
class PlantUmlBlock

BlockProcessor <|-- DiagramBlock
DiagramBlock <|-- DitaaBlock
DiagramBlock <|-- PlantUmlBlock
----

NOTE: plantUML needs graphviz dot installed to work.
If you can't install it, you can use java based version of the dot library.
Just add `!pragma graphviz_dot jdot` as first line of your diagram definition.
It is still an experimental feature, but already works quite well! +
https://rdmueller.github.io/plantuml-without-graphviz/

== Source

.build.gradle
[source,groovy]
----<commit_msg>Fixes and rewording<commit_after>ifndef::imagesdir[:imagesdir: ../images]
= generateHTML

image::ea/Manual/generateHTML.png[]

This is the standard asciidoctor generator which is supported out of the box.

The result is written to `build/docs/html5`.
The HTML files need the images folder to be in the same directory to display correctly.

NOTE: if you would like to have a single-file HTML as result, you can configure asciidoctor to store the images inline as `data-uri`. +
Just set `:data-uri:` in the config of your AsciiDoc file. +
But be warned - such a file can be easily very big and some browsers might get into trouble rendering them. +
https://rdmueller.github.io/single-file-html/

== Text based Diagrams

For docToolchain, it is configured to use the http://asciidoctor.org/docs/asciidoctor-diagram/[asciidoctor-diagram] plugin which is used to create plantUML diagrams.

The plugin also supports a bunch of other text based diagrams, but http://plantuml.com/[plantUML] is the most used.

To use it, just specify your plantUML code like this:

....
.example diagram
[plantuml, "{plantUMLDir}demoPlantUML", png] # <1>
----
class BlockProcessor
class DiagramBlock
class DitaaBlock
class PlantUmlBlock

BlockProcessor <|-- DiagramBlock
DiagramBlock <|-- DitaaBlock
DiagramBlock <|-- PlantUmlBlock
----
....

<1> The element of this list specifies the diagram tool `plantuml` to be used. +
The second element is the name of the image to be created and the third specifies the image type.

NOTE: the \{plantUMLDir} ensures that plantUML also works for the <<generatePDF>> task.
Without it, <<generateHTML>> works fine, but the PDF will not contain the generated images.

IMPORTANT: make sure to specify a unique image name for each diagram, otherwise they will overwrite each other.

The above example renders as

.example diagram
[plantuml, "{plantUMLDir}demoPlantUML", png]
----
!pragma graphviz_dot jdot
class BlockProcessor
class DiagramBlock
class DitaaBlock
class PlantUmlBlock

BlockProcessor <|-- DiagramBlock
DiagramBlock <|-- DitaaBlock
DiagramBlock <|-- PlantUmlBlock
----

NOTE: plantUML needs graphviz dot installed to work.
If you can't install it, you can use the Java based version of the dot library.
Just add `!pragma graphviz_dot jdot` as the first line of your diagram definition.
This is still an experimental feature, but already works quite well! +
https://rdmueller.github.io/plantuml-without-graphviz/

== Source

.build.gradle
[source,groovy]
----
{'fraction_non_alphanumeric': 0.08403869407496976, 'fraction_numerical': 0.0012091898428053204, 'mean_word_length': 4.377031419284941, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1999349', 'n_tokens_mistral': 1469, 'n_tokens_neox': 1439, 'n_words': 637}