Commit Graph

10 Commits

Author SHA1 Message Date
Anduin Xue
52bd8d6434 fix: remove minify plugin to resolve build issues
The mkdocs-minify-plugin with htmlmin was causing segfaults during the
properdocs build when processing the large i18n file set.

Changes:
- Removed mkdocs-minify-plugin from requirements.txt
- Removed htmlmin2 dependency
- Removed minify plugin from mkdocs_template.yml
- Regenerated properdocs.yml

Verification:
- Docker build: SUCCESS ✓
- Image loading: HTTP 200 ✓
- i18n functionality: Working ✓

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-05 09:26:20 +00:00
Anduin Xue
3c89c583ab fix: copy images to en/ and fix markdown image references
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>
2026-05-05 09:22:18 +00:00
Anduin Xue
3bb7159bf8 Add English i18n support with mkdocs-static-i18n
- 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>
2026-05-04 13:42:42 +00:00
Anduin Xue
a7d81fa681 Migrate from mkdocs to properdocs
- Replace mkdocs-with-pdf + weasyprint with properdocs>=1.6.7
- Add pymdown-extensions for richer markdown support
- Remove heavy apt dependencies (weasyprint, fonts-noto-cjk, wget, unzip)
- Switch build command from 'mkdocs build' to 'properdocs build --strict'
- Update template: add offline plugin, fix palette, add content.code.select/copy
- Add md_in_html, pymdownx.tilde, emoji, mermaid, annotation icon support
- Fix broken icon path material//weather-sunny

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-04 13:20:03 +00:00
xuef
f497818f21 chore: Update PDF plugin configuration and fix formatting in dishes/semi-finished/豆鼓.md 2024-06-03 07:26:59 +00:00
xuef
c10956782c Try to build with pdf. 2024-06-03 03:05:48 +00:00
Siming Yuan
f2a329724e adding more mkdocs customization for beautification 2022-02-28 17:58:51 -05:00
Siming Yuan
22a3947226 adding support for mkdocs-material hosting/docs generation 2022-02-28 11:45:05 -05:00
Anduin Xue
a2ef18e4e9 Revert some python stuff. 2022-03-01 00:32:46 +08:00
Siming Yuan
d4a46c77b1 - fixing doc reference bugs
- added support for mkdocs materia rendering
2022-02-28 10:21:33 -05:00