Skip to content

Commit 50b8276

Browse files
SilverRainZDeepSeek
andcommitted
迁移首页和笔记页的 recentupdate 按月分组展示
- index: 首页 recentupdate 按月份分组 - notes: 笔记页 recentupdate 按月份分组 Co-authored-by: DeepSeek <service@deepseek.com>
1 parent 8a7b091 commit 50b8276

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@
7878

7979
.. data.render::
8080
81-
{% set revs = load_extra('recentupdate', count=8) %}
81+
{% set revs = load_extra('recentupdate', count=6, group_by='month') %}
8282
8383
.. container:: timeline
8484
8585
{% for r in revs %}
86-
.. card:: :octicon:`calendar` {{ r.date.strftime('%Y-%m-%d') }}
86+
.. card:: :octicon:`calendar` {{ r.date.strftime('%Y 年 %m 月') }}
8787
:width: 50%
8888
:margin: 0 2 {{ loop.cycle('0 auto', 'auto 0') }}
8989
:class-card: surface

src/notes.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ SilverRainZ 的笔记
6868

6969
.. data.render::
7070
71-
{% set revs = load_extra('recentupdate', count=8) %}
71+
{% set revs = load_extra('recentupdate',
72+
count=6,
73+
paths=['src/notes/', 'src/p'],
74+
group_by='month') %}
7275
7376
.. container:: timeline
7477
7578
{% for r in revs %}
76-
.. card:: :octicon:`calendar` {{ r.date.strftime('%Y-%m-%d') }}
79+
.. card:: :octicon:`calendar` {{ r.date.strftime('%Y 年 %m 月') }}
7780
:width: 50%
7881
:margin: 0 2 {{ loop.cycle('0 auto', 'auto 0') }}
7982
:class-card: surface

0 commit comments

Comments
 (0)