Re: Chrome Asciidoctor.js plugin environment variables

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/include-and-imagesdir-in-different-folders-tp8154p8161.html

The imagesdir never has to reference a parent folder because images are resolved by the generated HTML file. You only have one generated file, so all images are resolved from there.

I think you may need to do some more experimentation. It's hard for me to describe it in more detail.

-Dan

On Sun, Aug 9, 2020, 04:41 yo [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Sorry, I am not sure to get it.

I think there are some inaccuracies in your example. Is it not missing some ../image  such as image::topic-a/image-for-topic-a-doc.png[] must be image::../images/topic-a/image-for-topic-a-doc.png[], or :topic: topic-a being :topic: ../images/topic-a? Doesn't matter.

But I think my situation is different as I would like to have a file including another but being in the parent folder as my previous example described:

Example of file system:
file1.ad
test/file2.ad

file1.ad
Bla bla
include test/file2.ad

test/file2.ad
:imagesdir: ../../src/img/

Bla bla bla
image::test.png[Test]

I will need to change a variable at one point in the document but how can I keep both documents to render the image. I need to define at the top of the file2.ad file the imagesdir. Then, including it from another file in a different path will fail.

Sorry if I miss something.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Chrome-Asciidoctor-js-plugin-environment-variables-tp8154p8160.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML