From b4969fde502b81ac5ea045cbf2d24c2db4bba8eb Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Thu, 20 Aug 2026 17:06:58 -0700
Subject: Update for Zola 0.23.4
---
templates/components/components.html | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
(limited to 'templates/components/components.html')
diff --git a/templates/components/components.html b/templates/components/components.html
index e12b45f..7833747 100644
--- a/templates/components/components.html
+++ b/templates/components/components.html
@@ -1,9 +1,9 @@
{% component translate(key: string, i18n, default="") %}
-{{- i18n[key] | default(value=default) | safe -}}
+{{- (i18n[key] if i18n[key] else default) | safe -}}
{% endcomponent translate %}
{%- component page_listing(page, config) %}
-{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
+{%- set uglyurls = (config.extra.uglyurls or false) -%}
{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{%- set uglyurls = true %}{%- endif %}{%- endif %}
{{ page.title | markdown(inline=true) | safe }}
@@ -11,7 +11,7 @@
{%- endcomponent page_listing %}
{%- component series_link(inner, page, config) %}
-{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
+{%- set uglyurls = (config.extra.uglyurls or false) -%}
{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{%- set uglyurls = true %}{%- endif %}{%- endif %}
{%- if inner.content == page.content %}
{{ inner.title }}
@@ -21,7 +21,7 @@
{%- endcomponent series_link %}
{%- component title_post(page, config) %}
-{%- set uglyurls = config.extra.uglyurls | default(value=false) %}
+{%- set uglyurls = (config.extra.uglyurls or false) %}
{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{%- set uglyurls = true %}{%- endif %}{%- endif %}
{%- endcomponent title_post %}
@@ -31,7 +31,7 @@
{%- set i18n = load_data(path="i18n/" ~ page.lang ~ '.toml', required=false) -%}
{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ page.lang ~ ".toml", required=false) -%}{%- endif -%}
-{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
+{%- set uglyurls = (config.extra.uglyurls or false) -%}
{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{%- set uglyurls = true -%}{%- endif %}{%- endif %}