You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a duplicate of / in the same spirit as #420. In that issue you can find a link to a Gradle plugin that @fwilhe created that allows themes to be loaded from git repository until there's a formal solution in place in Asciidoctor PDF.
My position is that the converter is not yet ready to take this formal step, so the Gradle plugin is a good immediate / temporary solution. The theme engine is still stabilizing, so I don't really want themes to rely on loading behavior at this point. We may still need to change things around in the design to accommodate that use case properly. But we will.
Asciidoctor PDF (running in a JVM) can read a file if it begins with uri:classloader:. So it should be possible to set the pdf-theme to a value that uses this prefix.
So here's what you do:
Create a folder named themes
Add the file my-theme.yml to this folder
Populate the contents with:
extends: default
base:
font-color: #ff0000
jar that folder up as themes.jar
add that jar to the classpath
set pdf-theme as follows: -a pdf-theme=uri:classloader:themes/my-theme.yml
Voila! You've loaded a theme from a jar file.
Outside of this, I believe this is a Gradle or Maven plugin issue.
Seems that theme files can not be loaded from custom jar files or the classpath in general (correct me if I am wrong).
Having this feature allows for simpler redistribution and reusage, if asciidoctor is embedded in e.g. a test reporting engine.
The text was updated successfully, but these errors were encountered: