-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Relative html img links are referencing non existing locale files since v1 #275
Comments
Issue has been fixed with v1.2.0 Sorry for the hassle, probably could have seen it coming with the pending pull request. Thank you! |
Actually version 1.2.0 didn't add anything after 1.1.1 that would influence this behavior. Also I don't think MkDocs processes the links of images written in HTML instead of Markdown, but as you say it's fixed, then perhaps some other version fixed that and you haven't used it before 🤔 |
Uh, I'm sorry the problem is not fixed actually. I was looking at the wrong part of the docs . So am I right that, since images (files) are not moved to the language dir anymore, html links will "break" because they are not processed? Do you have an idea how to deal with this? Since html has more features in how images are displayed it is the favored choice in some places. |
If I understand correctly the image name and extension doesn't change, just the relative path of directories to it.
What other features do you have in mind? You can add CSS classes or other attributes with the markdown_extensions:
- attr_list ![screenshot](assets/live_toggle.png){ style='width: 50%;' } |
I see, thanks for the clarification! The attribute list hint is great! Didn't come to my mind even though we already used the extension for another purpose. I will have a go with it. Some 200 html tags need to be replaced but then the style is also more consistent. I may not forget to add this in the docs contibution guidelines 😉
Serves as a very good solution for me. I will leave a note that, without knowing anything about the underlying process, I would love relative links in html tags to be working with multiple language directories. |
If I define a link to an img in my documentation and use markdown style
The image path will be adapted to always find the non localized image in either language file
If I define a link to an img and use html
The image path will only work for the default language since the relative path is kept intact and will not find anything at
.../fr/assets/live_overview.png
I understand that there have been changes to improve efficiency for non locale assets as described in #252
Though I would expect that html (img) links are treated similar to markdown image tags and are being converted.
Maybe I am just missing something.
I use
mkdocs_static_i18n-1.1.1
with
mkdocs-1.5.3
and
mkdocs_material-9.4.6
Thanks a lot for your beautiful work!
The text was updated successfully, but these errors were encountered: