diff options
| author | mayx <mayx@outlook.com> | 2026-03-08 11:54:41 +0100 |
|---|---|---|
| committer | mayx <mayx@outlook.com> | 2026-03-08 11:54:41 +0100 |
| commit | 5fd8d2fe0fd5cfe3ba3cebc9182233f7fb4478ab (patch) | |
| tree | 8e0bacc942b63640c22c85377a85f7024da93ffe /archives.md | |
| parent | c9dfb107330356e5945c8ee16eb409950ab83f21 (diff) | |
Update 2 files
- /archives.md
- /_data/other_repo_list.csv
Diffstat (limited to 'archives.md')
| -rw-r--r-- | archives.md | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/archives.md b/archives.md index 647633b..cfe07ce 100644 --- a/archives.md +++ b/archives.md @@ -5,23 +5,16 @@ title: Archives # Archives -* * * - -{% for post in site.posts %} -{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} -{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} -{% if forloop.first %} - -## {{ this_year }} +--- -{% endif %} +{% assign posts_by_year = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %} -- {{ post.date | date: "%Y/%m/%d" }} - [{{ post.title }}{% if post.layout == "encrypt" %} [加密] {% endif %}]({{ post.url }}) +{% for year in posts_by_year %} -{% if forloop.last %} -{% else %} -{% if this_year != next_year %} +## {{ year.name }} (共 {{ year.items | size }} 篇) -## {{next_year}} +{% for post in year.items %} +- {{ post.date | date: "%Y/%m/%d" }} - [{{ post.title }}{% if post.layout == "encrypt" %} [加密]{% endif %}]({{ post.url }}) +{% endfor %} -{% endif %} {% endif %} {% endfor %} +{% endfor %}
\ No newline at end of file |
