Fix posts sort

This commit is contained in:
Erick Ruiz de Chavez 2025-01-12 10:06:30 -05:00
parent 694a757ed9
commit 95f7331e57

View file

@ -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 %}