Module asciidoclet

Package org.asciidoctor.asciidoclet

Asciidoclet

Asciidoclet is a Javadoc Doclet that uses Asciidoctor (via the Asciidoctor Java integration) to interpret AsciiDoc markup within Javadoc comments.

Usage

Asciidoclet may be used via a custom doclet in the maven-javadoc-plugin:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>3.6.3</version>
  <configuration>
    <source>11</source>
    <doclet>org.asciidoctor.asciidoclet.Asciidoclet</doclet>
    <docletArtifact>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoclet</artifactId>
      <version>${asciidoclet.version}</version>
    </docletArtifact>
  </configuration>
</plugin>

Examples

Code block (with syntax highlighting added by CodeRay)
/**
 * = Asciidoclet
 *
 * A Javadoc Doclet that uses https://asciidoctor.org[Asciidoctor]
 * to render https://asciidoc.org[AsciiDoc] markup in Javadoc comments.
 *
 * @author https://github.com/johncarl81[John Ericksen]
 */
public class Asciidoclet extends Doclet {
    private final Asciidoctor asciidoctor = Asciidoctor.Factory.create(); // (1)

    @SuppressWarnings("UnusedDeclaration")
    public static boolean start(RootDoc rootDoc) {
        new Asciidoclet().render(rootDoc); // (2)
        return Standard.start(rootDoc);
    }
}
  1. Creates an instance of the Asciidoctor Java integration

  2. Runs Javadoc comment strings through Asciidoctor

Inline code

code() or code()

Headings

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Links

Doc Writer <[email protected]>
AsciiDoc is a lightweight markup language.
Learn more about it at https://asciidoctor.org.

Bullets
Unnumbered
  • bullet

  • bullet

    • bullet

    • bullet

  • bullet

    • bullet

    • bullet

      • bullet

      • bullet

        • bullet

        • bullet

          • bullet

          • bullet

        • bullet

      • bullet

    • bullet

  • bullet

Numbered
  1. bullet

  2. bullet

    1. bullet

    2. bullet

  3. bullet

    1. bullet

      1. bullet

      2. bullet

        1. bullet

        2. bullet

      3. bullet

      4. bullet

    2. bullet

    3. bullet

  4. bullet

Tables
Table 1. An example table
Column 1 Column 2 Column 3

1

Item 1

a

2

Item 2

b

3

Item 3

c

Sidebar block
Optional Title

Usage: Notes in a sidebar, naturally.

Admonitions
Important
Check this out!
Since:
0.1.0
Version:
0.1.0
Author:
John Ericksen
See Also:
Asciidoclet