Package org.asciidoctor

Asciidoclet

See:
          Description

Class Summary
Asciidoclet Asciidoclet
 

Package org.asciidoctor Description

Asciidoclet

Asciidoclet is a Javadoc Doclet that uses Asciidoctor (via the Asciidoctor Java integration) to render 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>2.9</version>
  <configuration>
    <source>1.7</source>
    <doclet>org.asciidoctor.Asciidoclet</doclet>
    <docletArtifact>
      <groupId>org.asciidoclet</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 http://asciidoctor.org[Asciidoctor]
 * to render http://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 <doc@example.com>
AsciiDoc is a lightweight markup language.
Learn more about it at http://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

Sidebar Block

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


Copyright © 2013. All Rights Reserved.