Create changelog list template

This commit is contained in:
Helen Chong 2024-04-17 22:27:29 +08:00
parent b953ba40ca
commit 82ce0ff99d
2 changed files with 11 additions and 9 deletions

View File

@ -0,0 +1,9 @@
<article>
{% for log in changelogList | reverse %}
<div class="heading-wrapper h2">
<h2 id="{{ log.fileSlug }}">{{ log.date | niceDate }}</h2>
<a class="heading-anchor" href="#{{ log.fileSlug }}" aria-labelledby="{{ log.fileSlug }}"><span hidden="">#</span></a>
</div>
{{ log.templateContent | safe }}
{%- endfor %}
</article>

View File

@ -8,12 +8,5 @@ metadata:
date: 2022-02-02 date: 2022-02-02
--- ---
<article> {% set changelogList = collections["changelog 2022"] %}
{% for log in collections["changelog 2022"] | reverse %} {% include "main/changelog-list.njk" %}
<div class="heading-wrapper h2">
<h2 id="{{ log.fileSlug }}">{{ log.date | niceDate }}</h2>
<a class="heading-anchor" href="#{{ log.fileSlug }}" aria-labelledby="{{ log.fileSlug }}"><span hidden="">#</span></a>
</div>
{{ log.templateContent | safe }}
{%- endfor %}
</article>