ultrabug / mkdocs-static-i18n

MkDocs i18n plugin using static translation markdown files
https://ultrabug.github.io/mkdocs-static-i18n/
MIT License
238 stars 38 forks source link

How to fix when translate got problem "warning not found image" #280

Open SavantEVO opened 1 year ago

SavantEVO commented 1 year ago

I'm experiencing an issue with my mkdocs project where images are not displaying correctly when I switch the language from the default (English) to Vietnamese. The problem arises because the URL adds a "vi" prefix, causing the image paths to break. Here are the details of the issue:

Steps to Reproduce: Start the mkdocs serve command. Access the default English version at: http://127.0.0.1:8000/ (images display correctly). Switch the language to Vietnamese. Access the Vietnamese version at: http://127.0.0.1:8000/vi (images are broken).

Expected Behavior: Images should display correctly in both the default (English) and Vietnamese versions of the site.

Actual Behavior: When switching to Vietnamese, the URL prefix "vi" is added, and images do not display because the path does not contain "vi/assets/images."

kamilkrzyskow commented 1 year ago

Are you perhaps using the HTML tag? Switch to Markdown syntax or use absolute paths.

https://github.com/ultrabug/mkdocs-static-i18n/issues/275

Or perhaps you're using the folder config structure, instead of suffix?