Customisable homepage limit posts

This commit is contained in:
Mahendrata Harpi
2020-08-29 11:24:21 +07:00
parent 14bcb9484e
commit 6fc041bfac
2 changed files with 6 additions and 3 deletions

View File

@@ -3,12 +3,12 @@ layout: default
home: true
---
<h4 class="posts-item-note">Recent Posts</h4>
{% for post in site.posts %}
<h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
{%- for post in site.posts limit: site.number_of_posts -%}
<article class="post-item">
<span class="post-item-date">{{ post.date | date: "%b %d, %Y" }}</span>
<h4 class="post-item-title">
<a href="{{ post.url }}">{{ post.title | escape }}</a>
</h4>
</article>
{% endfor %}
{%- endfor -%}