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

Output folder of rendered images of AsciiDoctor Diagram extension #12419

Open
jrauschenbusch opened this issue Apr 23, 2024 · 2 comments
Open

Comments

@jrauschenbusch
Copy link

jrauschenbusch commented Apr 23, 2024

Diagrams should get rendered to an output folder below resources/_gen/images. Otherwise one needs to add content/**/*.png|jpg|svg|... to the .gitignore file to avoid Git changes in the worktree which need to get reverted after each site build.

Currently if one is working with workingFolderCurrent: true the images are generated besides their origin *.adoc files. This is required when you want to have working relative AsciiDoc cross references and AsciiDoc includes. But it would be totally fine to have generated images in resources/_gen/images, as they are combined in Hugo's union file system. It would just be necessary that the folder structure under content would be reflected so that image references are fine. Also for permalinks of course.

Maybe there is a way to achieve this with the current AsciiDoctor integration.

I think the imagesoutdir attribute would need to be configured per file in a way that resources/_gen/images is used as prefix and content/path/to/image/origin/file.adoc is converted to path/to/image/origin/ and concatenated with the prefix.

resources/_gen/images/path/to/image/origin/

@jmooring What do you think?

@jmooring
Copy link
Member

What do you think?

I think this sounds like a lot of work with a low ROI, but maybe I'm missing something.

@jrauschenbusch
Copy link
Author

Hmm. Maybe you’re right. Alternative is to use a naming pattern for generated images of AsciiDoc and add it as pattern to the .gitignore file. Otherwise you’ll see 100s of changes each time for large pages. And i don’t want to commit generated images.

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