asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.15k stars 500 forks source link

Make docimagesdir attribute available in theme #2278

Closed mojavelinux closed 2 years ago

mojavelinux commented 2 years ago

The theme can currently access the value of the imagesdir attribute using {imagesdir}, but not the absolute path resolved from the document directory (i.e., docdir). To make the value absolute (assume it isn't already), the best the theme can do is use {docdir}/{imagesdir}. However, this assumes that the value is relative.

Compute the absolute path of the imagesdir and assign it to the docimagesdir attribute when resolving values from the theme.

mojavelinux commented 2 years ago

the best the theme can do is use {docdir}/{imagesdir}

Actually, this isn't true. In the theme, the imagesdir is always set to themesdir. That's why this new attribute is even more important.