feat(mustache): Added group_by filter to templates

This commit is contained in:
Spencer Brower
2026-07-20 11:05:48 -04:00
parent 29d244c1a6
commit 770a04481d
11 changed files with 556 additions and 193 deletions
+5 -5
View File
@@ -3,17 +3,17 @@
<main>
<h1>{{page_title}}</h1>
{{&body}}
{{#by_year}}
{{#posts | group_by year}}
<section>
<h2>{{year}}</h2>
<h2>{{key}}</h2>
<ul>
{{#posts}} <li><a href="{{permalink}}">{{&title}}</a><span>{{#date_iso}}<time
{{#items}} <li><a href="{{permalink}}">{{&title}}</a><span>{{#date_iso}}<time
datetime="{{date_iso}}">{{date_display}}</time>{{/date_iso}}</span>
</li>
{{/posts}}
{{/items}}
</ul>
</section>
{{/by_year}}
{{/posts}}
</main>
{{/content}}
{{/base}}