kisstkondoros / gutter-preview

Other
158 stars 37 forks source link

Support for paths relative to the base directory where the file is located #170

Open lolo120916 opened 2 months ago

lolo120916 commented 2 months ago

Would it be possible to add support for paths relative to the base directory where the file is located? For instance, this would allow to correctly deal with the document attribute :imagesdir: in AsciiDoc type documents.

To recap, the correct way to reference images in an AsciiDoc is to define a directory where the images are located using :imagesdir: and then simply indicate the image names throughout the document.

Example:

:imagesdir: illustrations

image:picture1.png[]
image:picture2.jpg[]

In this example, the paths are relative to the base directory where the AsciiDoc file is located, so the resolved paths are "illustrations/picture1.png" and "illustrations/picture2.jpg".

Thank you for everything.