Context
mkdocs-print-site-plugin was removed in #26 (Finnish translation pilot). It has no i18n support: it builds a single print page for the default language only, so every translated page would have linked to an English print page under an English tooltip. Removing it was the right call for that PR — the print button lied on Finnish pages.
The removal took a working English feature with it. The site previously published /print_page/ and showed a printer button on every page (docs/overrides/main.html, guarded by page.url_to_print_page). That URL now 404s.
What to figure out
Printing should come back, but only with something that produces a per-language print page. Options worth evaluating:
- Check whether
mkdocs-print-site-plugin has gained i18n support since, or whether mkdocs-static-i18n's multi-build model can be made to drive it once per language.
- Gate the button by locale as an interim measure —
mkdocs-static-i18n injects i18n_page_locale into the template context (plugin.py), so the existing guard in main.html can be narrowed to English. This restores /print_page/ and the English button without lying to Finnish readers. Rejected for now in favour of a proper multi-language solution, but it is cheap if the full fix stalls.
- A different print/PDF approach entirely (e.g. per-language PDF export in CI).
Decide
Whether /print_page/ returning 404 is acceptable in the meantime, or whether it warrants a redirect until printing returns.
Context
mkdocs-print-site-pluginwas removed in #26 (Finnish translation pilot). It has no i18n support: it builds a single print page for the default language only, so every translated page would have linked to an English print page under an English tooltip. Removing it was the right call for that PR — the print button lied on Finnish pages.The removal took a working English feature with it. The site previously published
/print_page/and showed a printer button on every page (docs/overrides/main.html, guarded bypage.url_to_print_page). That URL now 404s.What to figure out
Printing should come back, but only with something that produces a per-language print page. Options worth evaluating:
mkdocs-print-site-pluginhas gained i18n support since, or whethermkdocs-static-i18n's multi-build model can be made to drive it once per language.mkdocs-static-i18ninjectsi18n_page_localeinto the template context (plugin.py), so the existing guard inmain.htmlcan be narrowed to English. This restores/print_page/and the English button without lying to Finnish readers. Rejected for now in favour of a proper multi-language solution, but it is cheap if the full fix stalls.Decide
Whether
/print_page/returning 404 is acceptable in the meantime, or whether it warrants a redirect until printing returns.