Note
|
JBoss Forge needs to be installed. More info on the JBoss Forge website. |
-
Run Forge
forge
-
Install the jboss forge asciidoctor addon
addon-install-from-git --url https://github.com/mgreau/asciidoctor-forge-addon.git --coordinate org.jboss.forge.addon.asciidoctor:asciidoctor-forge-addon,1.0.0-SNAPSHOT
-
create a new forge project
project-new --named myproject
-
setup asciidoctor for Html5 outpout
asciidoctor-setup --useAsciidoctorDiagram -a toc=right sourceHighlighter=coderay icons=font sectanchors
-
build the project with forge
build
-
open the generated file
open target/generated-docs/manual.html
-
create a new forge project
project-new --named myproject
-
setup asciidoctor for PDF outpout
asciidoctor-setup --converter pdf -a toc sectanchors idprefix=a_ idseparator=_
-
build the project with forge
build
-
open the generated file
open target/generated-docs/manual.pdf
Great job Maxime!
Scope creep warning ahead:
I was thinking that it would be awesome if this plugin would allow you to run the
asciidoctor
command inside the forge shell. Rather than shell out to the Ruby command, theasciidoctor
command in Forge would delegate to AsciidoctorJ. That way, all you would need to runasciidoctor
from the CLI is to launch Forge and install this plugin. wdyt?We could even wire it into a file monitor so it continuously runs as the source document changes. That would be so slick?