From 95f7331e5717fae6b93be7282d9243a1bca2d3b3 Mon Sep 17 00:00:00 2001 From: Erick Ruiz de Chavez Date: Sun, 12 Jan 2025 10:06:30 -0500 Subject: [PATCH] Fix posts sort --- templates/home.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/home.jinja b/templates/home.jinja index 80d3db9..c2f2046 100644 --- a/templates/home.jinja +++ b/templates/home.jinja @@ -3,7 +3,7 @@ {% if stargem.posts -%} ## Latests Posts -{% for post in stargem.posts[:5] -%} +{% for post in (stargem.posts | sort(attribute='frontmatter.date', reverse=True))[:5] -%} => {{ post.path }} {{ post.frontmatter.date.strftime('%F') }} {{ post.frontmatter.title }} {% endfor %} {%- if stargem.posts | length > 5 %}