From c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c Mon Sep 17 00:00:00 2001 From: Jieiku Date: Fri, 14 Aug 2026 15:10:15 -0700 Subject: Update for Zola 0.23.3 --- templates/404.html | 27 +- templates/archive.html | 29 +- templates/base.html | 60 ++--- templates/categories/list.html | 33 +-- templates/categories/single.html | 31 +-- templates/components/audio.html | 30 +++ templates/components/components.html | 504 +++++++++++++++++++++++++++++++++++ templates/components/gif.html | 30 +++ templates/components/image.html | 64 +++++ templates/components/img.html | 52 ++++ templates/components/imgswap.html | 103 +++++++ templates/components/katex.html | 3 + templates/components/showdata.html | 9 + templates/components/streamable.html | 5 + templates/components/video.html | 30 +++ templates/components/vimeo.html | 5 + templates/components/youtube.html | 5 + templates/index.html | 74 +++-- templates/macros/macros.html | 378 -------------------------- templates/macros/seo.html | 145 ---------- templates/page.html | 196 +++++++------- templates/pages.html | 53 ++-- templates/partials/head.html | 44 ++- templates/partials/head_js.html | 52 ++-- templates/partials/social.html | 4 +- templates/shortcodes/audio.html | 29 -- templates/shortcodes/gif.html | 29 -- templates/shortcodes/image.html | 61 ----- templates/shortcodes/img.html | 49 ---- templates/shortcodes/imgswap.html | 100 ------- templates/shortcodes/katex.html | 1 - templates/shortcodes/showdata.html | 18 -- templates/shortcodes/streamable.html | 3 - templates/shortcodes/video.html | 29 -- templates/shortcodes/vimeo.html | 3 - templates/shortcodes/youtube.html | 3 - templates/tags/list.html | 33 +-- templates/tags/single.html | 31 +-- 38 files changed, 1143 insertions(+), 1212 deletions(-) create mode 100644 templates/components/audio.html create mode 100644 templates/components/components.html create mode 100644 templates/components/gif.html create mode 100644 templates/components/image.html create mode 100644 templates/components/img.html create mode 100644 templates/components/imgswap.html create mode 100644 templates/components/katex.html create mode 100644 templates/components/showdata.html create mode 100644 templates/components/streamable.html create mode 100644 templates/components/video.html create mode 100644 templates/components/vimeo.html create mode 100644 templates/components/youtube.html delete mode 100644 templates/macros/macros.html delete mode 100644 templates/macros/seo.html delete mode 100644 templates/shortcodes/audio.html delete mode 100644 templates/shortcodes/gif.html delete mode 100644 templates/shortcodes/image.html delete mode 100644 templates/shortcodes/img.html delete mode 100644 templates/shortcodes/imgswap.html delete mode 100644 templates/shortcodes/katex.html delete mode 100644 templates/shortcodes/showdata.html delete mode 100644 templates/shortcodes/streamable.html delete mode 100644 templates/shortcodes/video.html delete mode 100644 templates/shortcodes/vimeo.html delete mode 100644 templates/shortcodes/youtube.html (limited to 'templates') diff --git a/templates/404.html b/templates/404.html index 8c42866..70e1f91 100644 --- a/templates/404.html +++ b/templates/404.html @@ -2,20 +2,17 @@ {%- 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 %} +{%- block seo -%} {{ super() }} - {%- set title = "404 Page not found" %} - - {%- 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_404=true) }} -{%- endblock seo %} + {%- set title = "404 Page not found" -%} + {%- if config.title -%} + {%- set title_addition = title_separator ~ config.title -%} + {%- else -%} + {%- set title_addition = "" -%} + {%- endif -%} + {%- set description = config.description -%} + {{}} +{%- endblock seo -%} {%- block content %}
@@ -29,11 +26,11 @@ {%- set i18n_404 = load_data(path="i18n/" ~ lcode ~ '.toml', required=false) -%} {%- if not i18n_404 -%}{%- set i18n_404 = load_data(path="themes/abridge/i18n/" ~ lcode ~ ".toml", required=false) -%}{%- endif %} -

{{ macros::translate(key="404_not_found", default="404_not_found", i18n=i18n_404) }}{{ macros::translate(key="full_stop", default=".", i18n=i18n_404) }} {% if config.build_search_index %}{{ macros::translate(key="404_try_search", default="Try searching or", i18n=i18n_404) }}{% endif %} {{ macros::translate(key="404_go_home", default="go to homepage", i18n=i18n_404) }}{{ macros::translate(key="full_stop", default=".", i18n=i18n_404) }}

+

{{}}{{}} {% if config.build_search_index %}{{}}{% endif %} {{}}{{}}

{%- endif -%} {%- endfor -%} {% if config.default_language != "en" %} -

{{ macros::translate(key="404_not_found", default="404_not_found", i18n=i18n) }}{{ macros::translate(key="full_stop", default=".", i18n=i18n) }} {% if config.build_search_index %}{{ macros::translate(key="404_try_search", default="Try searching or", i18n=i18n) }}{% endif %} {{ macros::translate(key="404_go_home", default="go to homepage", i18n=i18n) }}{{ macros::translate(key="full_stop", default=".", i18n=i18n) }}

+

{{}}{{}} {% if config.build_search_index %}{{}}{% endif %} {{}}{{}}

{% endif %}
{%- endblock content %} 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 -%} + {{}} +{%- 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 %} diff --git a/templates/base.html b/templates/base.html index d16854c..97d2f4d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,29 +1,22 @@ -{%- import 'macros/seo.html' as macros_seo %} -{%- import "macros/macros.html" as macros %} -{# Load current language i18n data from .toml files in user's '/i18n' folder, use theme as fallback. #} +{#- Load current language i18n data from .toml files in user's '/i18n' folder, use theme as fallback. -#} {%- set i18n = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%} -{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ lang ~ ".toml", required=false) -%}{%- endif %} - +{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ lang ~ ".toml", required=false) -%}{%- endif -%} {%- set uglyurls = config.extra.uglyurls | default(value=false) -%} -{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %} +{%- if config.extra.search_library -%}{%- if config.extra.search_library == "offline" -%}{%- set uglyurls = true -%}{%- endif -%}{%- endif -%} - {%- include "partials/head.html" %} - - {#- SEO: title, description, etc #} - {%- block seo %} - {%- if config.extra.title_separator %} + {%- include "partials/head.html" -%} + {#- SEO: title, description, etc -#} + {%- block seo -%} + {%- if config.extra.title_separator -%} {%- set title_separator = " " ~ config.extra.title_separator ~ " " -%} - {%- else %} + {%- else -%} {%- set title_separator = " | " -%} - {%- endif %} - {%- endblock seo %} - - {%- block comments_init %} - {%- endblock comments_init %} - - {%- include "partials/head_js.html" %} + {%- endif -%} + {%- endblock seo -%} + {%- block comments_init -%}{%- endblock comments_init -%} + {%- include "partials/head_js.html" -%} {%- block header %} @@ -33,10 +26,10 @@ {%- if config.extra.logo -%} - {%- if config.extra.logo.file -%} - {{ config.extra.logo.alt | safe }} + {%- if config.extra.logo?.file -%} + {{ config.extra.logo?.alt | safe }} {%- endif -%} - {%- if config.extra.logo.text -%}{{ config.extra.logo.text | safe }}{%- endif -%} + {%- if config.extra.logo?.text -%}{{ config.extra.logo?.text | safe }}{%- endif -%} {%- elif config.extra.textlogo -%} @@ -55,8 +48,8 @@ {%- set js_switcher=config.extra.js_switcher | default(value=true) %} {%- if config.extra.menu %} {%- for i in config.extra.menu -%} -
  • - {%- if lang != config.default_language %} {{ macros::translate(key=i.name|safe, default=i.name|safe, i18n=i18n) }} {% else %} {{ i.name | safe }} {% endif -%} +
  • + {%- if lang != config.default_language %} {{}} {% else %} {{ i.name | safe }} {% endif -%}
  • {%- endfor -%} {%- endif -%} @@ -65,17 +58,17 @@