From 3f5f755694eb6dfa18a9548af5f8c1c89ffa859b Mon Sep 17 00:00:00 2001 From: Jieiku Date: Fri, 21 Jul 2023 10:37:56 -0700 Subject: svg favicon, archive reverse --- templates/archive.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'templates/archive.html') diff --git a/templates/archive.html b/templates/archive.html index fdbb5e8..eff70a9 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -52,6 +52,20 @@ This Template can also be used as the rendering template for Sections, eg: examp

{{ section_item.title }}

{%- endif %} {{- section_item.content | safe }} + {%- if config.extra.archive_reverse %} + {%- for year, posts in section_item.pages | sort(attribute="year") | reverse | group_by(attribute="year") %} + {%- if not hide_section_dates %} + {%- if section_item.title %} +

{{ year }}

+ {%- else %} +

{{ year }}

+ {%- endif %} + {%- endif %} + {%- for post in posts %} +

{{ post.title }}{%- if not hide_section_dates %} - {%- endif %}

+ {%- endfor %} + {%- endfor %} + {%- else %} {%- for year, posts in section_item.pages | group_by(attribute="year") %} {%- if not hide_section_dates %} {%- if section_item.title %} @@ -64,5 +78,6 @@ This Template can also be used as the rendering template for Sections, eg: examp

{{ post.title }}{%- if not hide_section_dates %} - {%- endif %}

{%- endfor %} {%- endfor %} + {%- endif %} {%- endblock content %} -- cgit v1.3.1