<commit_before>= Asciidoctor Maven Plugin: Java Extension Example

An example project that demonstrates how to create an extension for Asciidoctorj (written in Java) and how to use it in an other documentation Maven module.

== Description

=== asciidoctorj-twitter-extension

A maven plugin containing a the code that adds a `twitter` macro to asciidoctor.

With this extension you can write:

----
Contact: twitter:mojavelinux[] (project lead lead of the asciidoctor project)
----

=== asciidoctor-with-extension-example

An example project (very similar to `asciidoc-to-html-example`) that demonstrates how to use the `asciidoctorj-twitter-extension`.

It convert some AsciiDoc code using the `twitter` macro to HTML5.

== Usage

Convert the AsciiDoc to HTML5 by invoking the `compile` goal (configured as the default goal) on this aggregator module (`java-extension-example`):

 $ mvn

Open the file _asciidoctor-with-extension-example/target/generated-docs/example-manual.html_ in your browser to see the generated HTML file.
<commit_msg>Update the "java-extension-example" README<commit_after>= Asciidoctor Maven Plugin: Java Extension Example

An example project that demonstrates how to create an extension for Asciidoctorj (written in Java) and how to use it in an other documentation Maven module.

== Description

=== asciidoctorj-twitter-extension

A maven plugin containing a the code that adds a `twitter` macro to asciidoctor.

With this extension you can write:

----
Contact: twitter:mojavelinux[] (project lead lead of the asciidoctor project)
----

==== Extension registration

This twitter extension uses the link:https://github.com/asciidoctor/asciidoctorj#extension-spi[SPI interface] to register itself to the Asciidoctor engine.

See the corresponding files:

* link:asciidoctorj-twitter-extension/src/main/java/org/asciidoctorj/twitter/extension/TwitterMacroExtension.java[TwitterMacroExtension.java]
* link:asciidoctorj-twitter-extension/src/main/resources/META-INF/services/org.asciidoctor.extension.spi.ExtensionRegistry[org.asciidoctor.extension.spi.ExtensionRegistry]

=== asciidoctor-with-extension-example

An example project (very similar to `asciidoc-to-html-example`) that demonstrates how to use the `asciidoctorj-twitter-extension`.

It convert some AsciiDoc code using the `twitter` macro to HTML5.

== Usage

Convert the AsciiDoc to HTML5 by invoking the `compile` goal (configured as the default goal) on this aggregator module (`java-extension-example`):

 $ mvn

Open the file _asciidoctor-with-extension-example/target/generated-docs/example-manual.html_ in your browser to see the generated HTML file.

{'fraction_non_alphanumeric': 0.08087679516250945, 'fraction_numerical': 0.0015117157974300832, 'mean_word_length': 5.1415313225058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5609560', 'n_tokens_mistral': 754, 'n_tokens_neox': 740, 'n_words': 275}