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/page.html | 196 +++++++++++++++++++++++++--------------------------- 1 file changed, 93 insertions(+), 103 deletions(-) (limited to 'templates/page.html') diff --git a/templates/page.html b/templates/page.html index 10ea571..6615602 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,43 +1,39 @@ -{# This Template Shows the Individual Blog Posts#} - -{% extends "base.html" %} - -{%- block seo %} - {{- super() }} - {%- set title_addition = "" %} - {%- if page.title and config.title %} - {%- set title = page.title %} - {%- set title_addition = title_separator ~ config.title %} - {%- elif page.title %} - {%- set title = page.title %} - {%- else %} - {%- set title = config.title %} - {%- endif %} - - {%- if page.description %} - {%- set description = page.description %} - {%- else %} - {%- set description = config.description %} - {%- endif %} - {%- set created_time = page.date %} - {%- set updated_time = page.updated %} - {%- if current_section %} - {%- set page_section = current_section %} - {%- else %} - {%- set page_section = "" %} - {%- endif %} - - {{- macros_seo::seo(config=config, title=title, title_addition=title_addition, description=description, type="article", is_page=true, created_time=created_time, updated_time=updated_time, page_section=page_section) }} -{%- endblock seo %} +{#- This Template Shows the Individual Blog Posts -#} +{%- extends "base.html" -%} +{%- block seo -%} + {{- super() -}} + {%- set title_addition = "" -%} + {%- if page.title and config.title -%} + {%- set title = page.title -%} + {%- set title_addition = title_separator ~ config.title -%} + {%- elif page.title -%} + {%- set title = page.title -%} + {%- else -%} + {%- set title = config.title -%} + {%- endif -%} + {%- if page.description -%} + {%- set description = page.description -%} + {%- else -%} + {%- set description = config.description -%} + {%- endif -%} + {%- set created_time = page.date or "" -%} + {%- set updated_time = page.updated or page.date or "" -%} + {%- if current_section -%} + {%- set page_section = current_section -%} + {%- else -%} + {%- set page_section = "" -%} + {%- endif -%} + {{}} +{%- endblock seo -%} {%- block comments_init %} - {%- if not config.extra.comment_system or config.extra.comment_system == "hyvor" and config.extra.comments.hyvor %} + {%- if config.extra.comment_system == "hyvor" and config.extra.comments?.hyvor %} - {%- elif config.extra.comment_system == "remark42" and config.extra.comments.remark42 %} + {%- elif config.extra.comment_system == "remark42" and config.extra.comments?.remark42 %} @@ -46,63 +42,59 @@ {%- block content %}
+ {%- block page_header -%} + {{}} - {%- block page_header %} - {{- macros::title_post(page=page, config=config) }} - - {%- if config.extra.meta_post.position %} - {%- if config.extra.meta_post.position == "top" or config.extra.meta_post.position == "both" %} - {{- macros::meta_post(page=page, config=config) }} + {%- if config.extra.meta_post?.position %} + {%- if config.extra.meta_post?.position == "top" or config.extra.meta_post?.position == "both" %} + {{}} {%- endif %}{%- endif %} {%- endblock page_header %} - {# In Page Series Navigation #} + {#- In Page Series Navigation #} {%- if config.extra.series | default(value=true) %} {%- if page.extra.series %} {%- set tag = get_taxonomy_term(kind="tags", term=page.extra.series, lang=lang) %} - {%- set page_num = tag.page_count | as_str %} + {%- set page_num = tag.page_count | str %} {%- if lang != config.default_language %} - {%- set parts_string = macros::translate(key='Series_parts', default='Series', i18n=i18n) | replace(from="$NUMBER_OF_PARTS", to=page_num) %} - {% else %} + {%- set parts_string %}{{}}{%- endset %} + {%- set parts_string = parts_string | replace(from="$NUMBER_OF_PARTS", to=page_num) %} + {%- else %} {%- set parts_string = config.extra.Series_parts | default(value="Series") | replace(from="$NUMBER_OF_PARTS", to=page_num) %} - {% endif -%} + {%- endif %} -
-
- {{ tag.name }} ({{ parts_string }})
- {%- for inner in tag.pages | sort(attribute="date") %} - {%- if inner.content == page.content %} - {{ inner.title }}
- {%- set_global current_section_index = loop.index0 %} {# Finds the current section, needed for pagination logic later #} - {% else %} - {{ inner.title }}
- {%- endif %} - {%- endfor %} +
+
+ {{ tag.name }} ({{ parts_string }})
+ {%- for inner in tag.pages | sort(attribute="date") %} + {%- if inner.content == page.content %} + {{ inner.title }}
+ {%- set_global current_section_index = loop.index0 %} {# Finds the current section, needed for pagination logic later #} + {%- else %} + {{ inner.title }}
+ {%- endif %} + {%- endfor %} +
-
{%- endif %} {%- endif %} - {{ page.content | safe }} - - {%- if config.extra.meta_post.position %} - {%- if config.extra.meta_post.position == "bottom" or config.extra.meta_post.position == "both" %} - {{- macros::meta_post(page=page, config=config) }} + {%- if config.extra.meta_post?.position %} + {%- if config.extra.meta_post?.position == "bottom" or config.extra.meta_post?.position == "both" %} + {{}} {%- endif %}{%- endif %} {%- block page_footer %} - {{- macros::footer(page=page, config=config) }} + {{