aboutsummaryrefslogtreecommitdiff
path: root/templates/archive.html
diff options
context:
space:
mode:
authorJieiku2026-08-14 15:10:15 -0700
committerJieiku2026-08-14 15:10:15 -0700
commitc2d72e09747a2a4abe9602e1ba49a1b4649c9d3c (patch)
tree51a272ef184752e27bb70c07e4726dbdbbe6e237 /templates/archive.html
parentd52609f456f233ec0845c8a57a1e27583f0813ad (diff)
downloadabridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.tar.gz
abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.tar.bz2
abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.zip
Update for Zola 0.23.3
Diffstat (limited to 'templates/archive.html')
-rw-r--r--templates/archive.html29
1 files changed, 13 insertions, 16 deletions
diff --git a/templates/archive.html b/templates/archive.html
index aac705a..8bc0f27 100644
--- a/templates/archive.html
+++ b/templates/archive.html
@@ -7,24 +7,21 @@ This Template can also be used as the rendering template for Sections, eg: examp
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
-{%- block seo %}
- {{- super() }}
- {%- set title = "Archive" %}
-
- {%- if config.title %}
- {%- set title_addition = title_separator ~ config.title %}
- {%- else %}
- {%- set title_addition = "" %}
- {%- endif %}
-
- {%- set description = config.description %}
-
- {{- macros_seo::seo(config=config, title=title, title_addition=title_addition, description=description, is_home=true) }}
-{%- endblock seo %}
+{%- block seo -%}
+ {{- super() -}}
+ {%- set title = "Archive" -%}
+ {%- if config.title -%}
+ {%- set title_addition = title_separator ~ config.title -%}
+ {%- else -%}
+ {%- set title_addition = "" -%}
+ {%- endif -%}
+ {%- set description = config.description -%}
+ {{<seo config={config} title={title} title_addition={title_addition} description={description or ""} is_home={true} />}}
+{%- endblock seo -%}
{%- block content %}
{#- The following line is checking if the template is being used for the archive page or a section #}
- {%- if current_path is matching("^(/[[:alpha:]][[:alpha:]])?/archive/$") %}
+ {%- if current_path is matching(pat="^(/[[:alpha:]][[:alpha:]])?/archive/$") %}
{%- if section.extra.sec %}
{%- set sec = section.extra.sec ~ "/" %}
{%- else %}
@@ -36,7 +33,7 @@ This Template can also be used as the rendering template for Sections, eg: examp
{%- set langpath = "/" ~ lang ~ "/" %}
{%- endif %}
- {%- set sec = current_path | trim_start_matches(pat=langpath) | split(pat="/page/") | slice(end=1) | join(sep="") | trim_end_matches(pat="/") %}
+ {%- set sec = current_path | trim_start(pat=langpath) | split(pat="/page/") | first | trim_end(pat="/") %}
{%- set sec = sec ~ "/" %}
{%- endif %}