fix: issue #35 validation expected unrendered .lang translation variant routes; main-language lists now render main-language translations

This commit is contained in:
2026-07-17 22:12:23 +02:00
parent dd53ca3fbc
commit 23f05b72f7
6 changed files with 180 additions and 129 deletions

View File

@@ -113,6 +113,17 @@ invariant MultiLanguageRoutes {
-- Each language subtree gets its own feeds and archives
}
invariant LanguageVariantSelection {
-- Every language tree renders each post in its own language when a
-- matching variant exists, falling back to the post's original language.
-- This applies uniformly to single pages, list pages (home/pagination,
-- category/tag/date archives), and feeds:
-- Main tree: a post whose language differs from main_language renders
-- its main_language translation when one exists (canonical variant).
-- Additional-language trees: posts resolve to that language's
-- translation; do_not_translate posts are excluded from those trees.
}
invariant CanonicalBaseUrlConfigured {
for generation in SiteGenerations:
generation.base_url != ""