all repos — zola-bearblog @ 18a135696a6f5a02a641a16c2881a2694f26ce1a

Port of bear blog theme to zola

Merge pull request 'Upgrade to latest zola & Tera 2' (#41) from adidalal/zola-bearblog:tera-v2 into main Reviewed-on: https://codeberg.org/alinnow/zola-bearblog/pulls/41

Alin
commit

18a135696a6f5a02a641a16c2881a2694f26ce1a

parent

593a8bb3f16404389c85dcec544d6dc188ad3a39

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M templates/language_switcher.htmltemplates/language_switcher.html
@@ -1,7 +1,7 @@
-{%- if config.extra.language_switcher %} +{%- if config.extra?.language_switcher %} <nav class="lang" aria-label="{{ trans(key="language", lang=lang) }}"> - {%- set language_agnostic_path = current_path | default(value="/") | replace(from='/' ~ lang ~ '/', to = '/') | trim_start_matches(pat = '/') %} - {%- for tr in config.extra.translations %} + {%- set language_agnostic_path = (current_path or "/") | replace(from='/' ~ lang ~ '/', to = '/') | trim_start(pat = '/') %} + {%- for tr in config.extra?.translations %} {%- if tr.code == lang %} <span class="active">{{ tr.name }}</span> {%- else %}