feat: add support for tags ordering
This commit is contained in:
parent
2bf6ffece9
commit
ac0d2a49c9
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ layout: layouts/parent.njk
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2>{{ tag }}</h2>
|
<h2>{{ tag }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for post in collections[tag] -%}
|
{%- for post in collections[tag] | sort(false, true, "data.order") -%}
|
||||||
<li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
|
<li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -27,7 +27,7 @@ layout: layouts/parent.njk
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2>{{ tag }}</h2>
|
<h2>{{ tag }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for post in collections[tag] -%}
|
{%- for post in collections[tag]-%}
|
||||||
<li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
|
<li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue