diff options
| author | Jieiku | 2023-07-21 10:37:56 -0700 |
|---|---|---|
| committer | Jieiku | 2023-07-21 10:37:56 -0700 |
| commit | 3f5f755694eb6dfa18a9548af5f8c1c89ffa859b (patch) | |
| tree | 0c1a24e6816065a77a70008381926e2399442e9c /templates/archive.html | |
| parent | cd71559564732e4f2b4752560ff1b6de6f737a79 (diff) | |
| download | abridge-3f5f755694eb6dfa18a9548af5f8c1c89ffa859b.tar.gz abridge-3f5f755694eb6dfa18a9548af5f8c1c89ffa859b.tar.bz2 abridge-3f5f755694eb6dfa18a9548af5f8c1c89ffa859b.zip | |
svg favicon, archive reverse
Diffstat (limited to 'templates/archive.html')
| -rw-r--r-- | templates/archive.html | 15 |
1 files changed, 15 insertions, 0 deletions
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 <h2>{{ section_item.title }}</h2> {%- 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 %} + <h3>{{ year }}</h3> + {%- else %} + <h2>{{ year }}</h2> + {%- endif %} + {%- endif %} + {%- for post in posts %} + <p><a href="{{ post.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ post.title }}</a>{%- if not hide_section_dates %} - <time datetime="{{ post.date }}">{{ post.date | date(format="%F") }}</time>{%- endif %}</p> + {%- 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 <p><a href="{{ post.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ post.title }}</a>{%- if not hide_section_dates %} - <time datetime="{{ post.date }}">{{ post.date | date(format="%F") }}</time>{%- endif %}</p> {%- endfor %} {%- endfor %} + {%- endif %} </div> {%- endblock content %} |
