Commit 040dcf8
committed
Multilingual graph for taxonomy term pages
/faq/{category}/ and /news/{section}/ pages had no hreflang, no
language menu, and an empty JS pageTranslations map because Zola's
term resource exposes no .translations field.
Base.html now derives a per-language term URL list by inspecting the
first page in the term: that page's translations point to each
per-language version, and each per-language version declares its
taxonomy slug in its own frontmatter (which is the localized term
slug). Built as parallel arrays since Tera has no inline dict literal.
The derived data feeds three places:
* <link rel="alternate" hreflang> in base.html
* The language dropdown in language_selector.html
* The pageTranslations map in language_redirect.html
Each FAQ term page now ships 34 hreflang entries (33 langs + x-default)
plus 32 language menu items linking to the correctly-localized slug
(/it/faq/applicazione/, /ru/faq/приложение/, /pl/faq/aplikacja/, etc).1 parent 3a1cb44 commit 040dcf8
3 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
0 commit comments