Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 05a752b

Browse files
committed
Update whatsnew template
Add grouping by moth and by date
1 parent 5480072 commit 05a752b

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

src/whats-new.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,40 @@ title: What's new on DevDocs
1515

1616
{% assign grouped_by_year = entries | group_by_exp: "entry", "entry.date | date: '%Y'" %}
1717

18-
{% for group in grouped_by_year limit:2 %}
18+
{% for year_group in grouped_by_year limit:2 %}
1919

20-
## {{ group.name }}
20+
{% assign grouped_by_month = year_group.items | group_by_exp: "entry", "entry.date | date: '%B'" %}
21+
## {{ year_group.name }}
22+
23+
{% for month_group in grouped_by_month %}
24+
### {{ month_group.name }}
25+
26+
{% assign grouped_by_date = month_group.items | group_by: "date" %}
27+
28+
{% for date_group in grouped_by_date %}
29+
#### {{ date_group.name }}
2130

2231
<table>
2332
<thead>
2433
<tr>
2534
<th>Description</th>
2635
<th>Versions</th>
2736
<th>Type</th>
28-
<th>Date</th>
37+
<th>Pull request</th>
2938
</tr>
3039
</thead>
3140
<tbody>
32-
{% for item in group.items %}
41+
{% for item in date_group.items %}
3342
<tr>
3443
<td>{{ item.description | markdownify }}</td>
3544
<td>{{ item.versions }}</td>
3645
<td>{{ item.type }}</td>
37-
<td>
38-
{%- if item.link -%}
39-
<a href="{{ item.link }}">{{ item.date | date: "%B&nbsp;%e" }}</a>
40-
{%- else -%}
41-
{{ item.date | date: "%B&nbsp;%e" }}
42-
{%- endif -%}
43-
</td>
46+
<td><a href="{{ item.link }}">{{ item.link | split: "/" | last }}</a></td>
4447
</tr>
4548
{% endfor %}
4649
</tbody>
4750
</table>
51+
{% endfor %}<!-- date_group -->
52+
{% endfor %}<!-- month_group -->
4853

49-
{% endfor %}
54+
{% endfor %}<!-- year_group -->

0 commit comments

Comments
 (0)