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

Incorrect diagram directory in multilingual project with asciidoctor #10473

Open
anlar opened this issue Nov 27, 2022 · 1 comment
Open

Incorrect diagram directory in multilingual project with asciidoctor #10473

anlar opened this issue Nov 27, 2022 · 1 comment

Comments

@anlar
Copy link

anlar commented Nov 27, 2022

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.107.0-2221b5b30a285d01220a26a82305906ad3291880+extended linux/amd64 BuildDate=2022-11-24T13:59:45Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes.

Details

When using Hugo to render asciidoc articles containing diagrams by default it puts diagram images to the folder without language prefix even for multilingual projects.

Scenario 1 (single language) - OK

E.g. I have a project with a single language and an article content/post/post-3.ru.adoc with a diagram which will be rendered to:

$ tree public/post/post-3/
public/post/post-3/
├── index.html
└── sequence-diagram-example.svg

It works just fine, post-3 will reference its diagram from public/post/post-3 directory.

Scenario 2 (project with language directories) - FAIL

Now I have a project with several languages - each of them in its own directory, config.toml:

defaultContentLanguage = 'ru'
defaultContentLanguageInSubdir = true

post-3 will be put to (and tries to reference diagram from here):

$ tree public/ru/post/post-3/
public/ru/post/post-3/
└── index.html

But diagram still located in non-language directory:

$ tree public/post/post-3/
public/post/post-3/
└── sequence-diagram-example.svg

Workaround

For now I'm able to bypass that issue by manually setting image location in each article. From above example:

:imagesoutdir: public/ru/post/post-3
@jmooring jmooring changed the title [asciidoctor] Incorrect diagram directory in multilingual project Incorrect diagram directory in multilingual project with asciidoctor May 30, 2023
Copy link

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions github-actions bot added the Stale label May 30, 2024
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