Customisable homepage limit posts
This commit is contained in:
@@ -59,6 +59,9 @@ jekyll_compose:
|
|||||||
tags: []
|
tags: []
|
||||||
description:
|
description:
|
||||||
|
|
||||||
|
# Homepage limit posts
|
||||||
|
number_of_posts: 5
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
# theme: klise
|
# theme: klise
|
||||||
sass:
|
sass:
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ layout: default
|
|||||||
home: true
|
home: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<h4 class="posts-item-note">Recent Posts</h4>
|
<h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
|
||||||
{% for post in site.posts %}
|
{%- for post in site.posts limit: site.number_of_posts -%}
|
||||||
<article class="post-item">
|
<article class="post-item">
|
||||||
<span class="post-item-date">{{ post.date | date: "%b %d, %Y" }}</span>
|
<span class="post-item-date">{{ post.date | date: "%b %d, %Y" }}</span>
|
||||||
<h4 class="post-item-title">
|
<h4 class="post-item-title">
|
||||||
<a href="{{ post.url }}">{{ post.title | escape }}</a>
|
<a href="{{ post.url }}">{{ post.title | escape }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
|
|||||||
Reference in New Issue
Block a user