Context
mkdocs-print-site-plugin was removed in #18 (Finnish translation). It has no i18n support: it builds a single print page for the default language only, so every Finnish 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 would have 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 lines 13–15, guarded by page.url_to_print_page). That guard is now always false, so the button disappears everywhere and the URL 404s.
The template override is left in place untouched, so restoring the plugin restores the button with no template work.
What to figure out
Printing should come back, but only with something that produces a per-language print page. Worth evaluating:
- Whether
mkdocs-print-site-plugin has gained i18n support, or whether mkdocs-static-i18n's multi-build model can drive it once per language.
- Gating the button by locale as an interim measure —
mkdocs-static-i18n injects i18n_page_locale into the template context, so the existing guard in main.html can be narrowed to English. That restores /print_page/ and the English button without lying to Finnish readers.
- A different approach entirely, such as per-language PDF export in CI.
Decide
Whether /print_page/ returning 404 in the meantime is acceptable, or whether it warrants a redirect until printing returns.
See also
hatlabs/halpi2#27 — the same problem, same cause, still open. Whatever solves one should solve both, and the two repositories now share the translation machinery, so a fix is worth writing once.
Context
mkdocs-print-site-pluginwas removed in #18 (Finnish translation). It has no i18n support: it builds a single print page for the default language only, so every Finnish 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 would have 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.htmllines 13–15, guarded bypage.url_to_print_page). That guard is now always false, so the button disappears everywhere and the URL 404s.The template override is left in place untouched, so restoring the plugin restores the button with no template work.
What to figure out
Printing should come back, but only with something that produces a per-language print page. Worth evaluating:
mkdocs-print-site-pluginhas gained i18n support, or whethermkdocs-static-i18n's multi-build model can drive it once per language.mkdocs-static-i18ninjectsi18n_page_localeinto the template context, so the existing guard inmain.htmlcan be narrowed to English. That restores/print_page/and the English button without lying to Finnish readers.Decide
Whether
/print_page/returning 404 in the meantime is acceptable, or whether it warrants a redirect until printing returns.See also
hatlabs/halpi2#27 — the same problem, same cause, still open. Whatever solves one should solve both, and the two repositories now share the translation machinery, so a fix is worth writing once.