Skip to content

Latest commit

 

History

History
89 lines (76 loc) · 2.54 KB

README.adoc

File metadata and controls

89 lines (76 loc) · 2.54 KB

Jamal Markdown integration module

With this module you can convert some Markdown text to HTML in your Jamal file. The major use case is to include Markdown text into your JavaDoc when you are using Jamal support for Javadoc.

Dependency

To use the module, you have to have the code on the classpath. This can be done adding

    <groupId>com.javax0.jamal</groupId>
    <artifactId>jamal-markdown</artifactId>
    <version>2.8.2-SNAPSHOT</version>

to your Maven pom.xml.

To use this macro together with the Jamal doclet you can configure the Maven JavaDoc plugin

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>3.2.0</version>
    <configuration>
        <detectOfflineLinks>false</detectOfflineLinks>
        <doclint>none</doclint>
        <doclet>javax0.jamal.doclet.JamalDoclet</doclet>
        <docletArtifact>
            <groupId>com.javax0.jamal</groupId>
            <artifactId>jamal-doclet</artifactId>
            <version>2.8.2-SNAPSHOT</version>
        </docletArtifact>
        <additionalOptions>
            <additionalOption>--source-root</additionalOption>
            <additionalOption>${project.build.sourceDirectory}</additionalOption>
        </additionalOptions>
        <taglets>
            <taglet>
                <tagletClass>javax0.jamal.doclet.JamalTaglet</tagletClass>
                <tagletArtifact>
                    <groupId>com.javax0.jamal</groupId>
                    <artifactId>jamal-doclet</artifactId>
                    <version>2.8.2-SNAPSHOT</version>
                </tagletArtifact>
            </taglet>
            <tagletArtifacts>
                <tagletArtifact> (1)
                    <groupId>com.javax0.jamal</groupId>
                    <artifactId>jamal-markdown</artifactId>
                    <version>2.8.2-SNAPSHOT</version>
                </tagletArtifact>
            </tagletArtifacts>
        </taglets>
    </configuration>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>
  1. in this case the module has to be added to the JavaDoc configuration as a tagletArtifacts/tagletArtifact with the module Maven coordinates.

Use

The module defines one single dependency at the moment: md. The argument of the macro is the

Jamal source
{@md this is *bold*}

will output

output
<p>this is <em>bold</em></p>