feat: show full date on index
This commit is contained in:
parent
9e4372cf3d
commit
ceedef8441
2 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
{% macro list(posts) %}
|
{% macro list(posts, format = "MM/DD") %}
|
||||||
<ul class="[ posts-list ] [ flow list-none m-0 p-0 flow-space-0.5 ]">
|
<ul class="[ posts-list ] [ flow list-none m-0 p-0 flow-space-0.5 ]">
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
<li class="[ posts-list-item line-height-l gap-1 ]">
|
<li class="[ posts-list-item line-height-l gap-1 ]">
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
<a href="{{ post.url }}">{{ post.data.title }}</a>
|
<a href="{{ post.url }}">{{ post.data.title }}</a>
|
||||||
<div class="[ text-fadeText font-size-s line-height-m ]">{{ post.data.excerpt }}</div>
|
<div class="[ text-fadeText font-size-s line-height-m ]">{{ post.data.excerpt }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="[ text-fadeText ]">{{ post.data.date | formatDate("MM/DD") }}</div>
|
<div class="[ text-fadeText ]">{{ post.data.date | formatDate(format) }}</div>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -17,10 +17,10 @@ permalink: /
|
||||||
<p>Hand-picked, curated selection of my favourite posts!</p>
|
<p>Hand-picked, curated selection of my favourite posts!</p>
|
||||||
{% set favouritePosts = collections.post | filterFavourites | reverse %}
|
{% set favouritePosts = collections.post | filterFavourites | reverse %}
|
||||||
<section>
|
<section>
|
||||||
{{ list(favouritePosts) }}
|
{{ list(favouritePosts, "MM/DD/YYYY") }}
|
||||||
</section>
|
</section>
|
||||||
<h2>Recent posts</h2>
|
<h2>Recent posts</h2>
|
||||||
{% set recentPosts = collections.post | reverse | limit(5) %}
|
{% set recentPosts = collections.post | reverse | limit(5) %}
|
||||||
<section>
|
<section>
|
||||||
{{ list(recentPosts) }}
|
{{ list(recentPosts, "MM/DD/YYYY") }}
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue