Feature request: provide per-component or per-version PDF themes
Assembler, by default, creates a separate PDF per component and version. That means that there would be an opportunity to "pin" a PDF theme to a component or version.
The primary use case that I'm considering is specifying an externally-managed repo in my playbook's content sources. For example, if I include the Antora and Antora Default UI documentation as content sources alongside my own documentation. It seems weird to build "Antora" PDFs using my documentation's PDF theme.
Similarly, a rebranding effort may have taken place (requiring a PDF theme update), yet PDFs for old versions of documentation should remain consistent, in their look and content, with previously-generated PDFs.
What I'm suggesting is that where the pdf-theme
attribute of the antora-assembler.yml
file is defined, permit keys+values to associate Antora component names with PDF themes. For example:
asciidoc:
attributes:
pdf-theme:
mycomponent: ./pdf/my-theme.yml
v2021.4: ./pdf/old-theme.yml
v2022.17: ./pdf/version17-theme.yml
antora: ./antora-pdf/antora.theme.yml
~: ./pdf/default-theme.yml
For this example, the theme used to generate mycomponent
PDFs would default to the my-theme.yml
for all versions, but the v2021.4
version and the v2022.17
versions would use version-specific themes. The antora
component would use the antora.theme.yml
theme for all versions. All other components and versions would use the default-theme.yml
.
With this kind of configuration for pdf-theme
, similar configuration support for pdf-fontsdir
might also be required.
Having written this out, I recognize that there may be other attributes that need to be associated with components for versions, such as toc
, media
, compress
, and so on. So it might be useful to, instead or in combination with the above idea, do something like:
asciidoc:
componentAttributes:
mycomponent:
versionAttributes:
v2021.4:
pdf-theme: ./pdf/old-theme.yml
pdf-fontsdir: ./pdf/fonts-2021
media: print
v2022.17:
pdf-theme: ./pdf/version17-theme.yml
pdf-fontsdir: ./pdf/fonts-2022
media: prepress
attributes:
compress: ''
attributes:
kroki-fetch-diagram: ~
With this configuration, all PDFs generated could use Kroki diagrams, all mycomponent
PDF would enable compression, and version-specific attributes would set theme and media
attributes.