AsciidocFX
AsciidocFX copied to clipboard
Headless mode
Is it possible to run AsciidocFx in headless mode, e.g. for CI Build of documents?
Technically can be developed, but AsciidocFX has no such a feature yet.
If your goal is to convert asciidoc-files to HTML, PDF, etc. AsciidocFX is not needed as there is already asciidoctor, which is a CLI tool, which does exactly that. If, by chance you are using Java/Maven, there is also a Maven-plugin. This combination allows it for example to generate Asciidoc from your codebase and include it in your technical documentation. This is e.g. done with this library (which uses Java, Spring, Gradle) spring-restdocs. (Actually due to this project I discovered Asciidoc some years ago, but I used it with Maven.)
Perhaps there are also plug-ins for your build tool?
thanks for your reply. I already using the Maven Plugin, but cannot utilize some of the extensions of AsciidocFX, e.g. for diagrams
I have not looked in the code, but wouldn't it be nicer if the custom processors would be extracted to an own library.
Then they could be used with the Maven plugin. At least if I understand the extensions
sections correctly.
On the other side, it might be that JavaFx makes the usage of this approach very hard to use?
https://docs.asciidoctor.org/maven-tools/latest/plugin/goals/process-asciidoc/#configuration
<plugin>
...
<executions>
<execution>
<configuration>
...
<extensions>
<extension>
<className>org.asciidoctor.maven.SomePreprocessor</className>
</extension>
<extension>
<className>org.asciidoctor.maven.SomeBlockProcessor</className>
<blockName>yell</blockName>
</extension>
</extensions>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.asciidoctor.maven</groupId>
<artifactId>my-asciidoctor-extensions</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>
thanks for your reply. I already using the Maven Plugin, but cannot utilize some of the extensions of AsciidocFX, e.g. for diagrams
https://github.com/asciidoctor/asciidoctor-maven-examples/tree/main/asciidoctor-diagram-example