Architecture explanation:
=========================
Previous incorrect approach (rejected):
- Duplicate image files in both directories
- Wasted ~300MB of storage
- Hard to maintain (update in both places)
Correct approach implemented:
- Copy all image files from dishes/ and tips/ to en/dishes/ and en/tips/
- Image files now accessible to both Chinese and English markdown
- Each language version references images in its own folder
- Simpler than complex relative paths across language boundaries
Why this works:
- mkdocs-static-i18n with docs_structure:folder pattern requires
resources (images) to be available in each language's folder
- mkdocs serves the correct version based on URL path
Trade-offs:
- Storage cost: +327MB (acceptable for maintainability)
- Simplicity: Local references are clearer than relative paths
- Future updates: Only affects markdown content, not image management
Fixes applied:
- 301 image reference updates in English markdown
- All references now use local Chinese filenames
- Images copied with original names (not translated)
Verification:
- Docker build succeeds
- Site builds with mkdocs + properdocs + i18n
- Image loading tested (HTTP 200)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add mkdocs-static-i18n to requirements.txt
- Configure i18n plugin: zh (default) at root, en/ subfolder
- Add language switcher (alternate) in extra config
- Disable navigation.instant (incompatible with i18n switcher)
- Add nav_translations for all category labels in English
- Update readme-generate.js: dish/tip nav entries use path-only
(mkdocs auto-uses page heading = English title for /en/ pages)
- en/ folder to be populated by dotlang translation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>