Re: Chrome Asciidoctor.js plugin environment variables

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

Hi Dan,
You are right. home=/home/username works.

I am here because I use :imagesdir: to display images. However, my code is shared on git and I want everyone to have it functional at the first time. The folder is under $HOME/folder.

First I was using :imagesdir: as :imagesdir: ../../../src/img. But as I use some include, it can not resolve them when they are not in the same folder. Were you aware of this issue?

Then I decided to use {user-home} that solved this particular issue but then facing the plugins environment variables. Indeed, I can not override it. But I would like the same script to be functional for all the programs that are going to interpret it such as atom, asciidoctor, etc.

These lines seems to work in atom and brave at the same time :
:home: {user-home}
:imagesdir: {home}/path/to/img/


The brave asciidoctor plugin seems to not care at the :home: {user-home} declaration.

Do you have a better solution for me ?

The browser app should have in its parameters the $HOME environment variable ? I am not sure to understand the user-home attribute is hard-coded as ".", it makes reference to $HOME, no ? There is no asciidoctor attribute making reference to $HOME ?
Thanks for your time.