Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kroki-fetch-diagram] Configurable fetch dir #246

Open
gquintana opened this issue Apr 16, 2021 · 3 comments
Open

[kroki-fetch-diagram] Configurable fetch dir #246

gquintana opened this issue Apr 16, 2021 · 3 comments

Comments

@gquintana
Copy link

gquintana commented Apr 16, 2021

When kroki-fetch-diagram is enabled, the diagram is fetched in the current dir.
I'd like to be able to select the target directory, for example images/kroki, containing downloaded diag-<hash>.svg files.
In short, I'd like to have kroki-fetch-dir or kroki-images-dir which would be the default target folder and would override the default imagesdir when set.

@ggrossetie
Copy link
Member

ggrossetie commented Apr 16, 2021

You can use imagesoutdir but the path used in the HTML is controlled by imagesdir. The imagesoutdir attribute tells Asciidoctor Kroki where to write the file. The imagesdir attribute tells the processor what to put in the HTML.

Is that what you are looking for?

I'm adding the documentation label since this is an undocumented feature 😅

@gquintana
Copy link
Author

Thanks for pointing out the imagesoutdir attribute.

Given a document containing both handmade images and Kroki generated images. I'd like to be able to place images in different folders (the Kroki output directory can be Git ignored, can be pruned, can be a subfolder of the main imagesdir).

When I set imagesoutdir=kroki and imagesdir=main, images are fetched in the kroki directory (good start), but the HTML references them in the main directory, so they are 404 not found.

@ggrossetie
Copy link
Member

As far as I know it's not supported by Asciidoctor. If you want to use this configuration then I think you will need to manually copy images to the imagesdir directory.

You should ask on https://asciidoctor.zulipchat.com/ maybe someone will have a better idea...

(sorry for the laaaaate reply!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants