diff --git a/_config.yml b/_config.yml index 5eb7753..4a92f3e 100644 --- a/_config.yml +++ b/_config.yml @@ -59,6 +59,9 @@ jekyll_compose: tags: [] description: +# Homepage limit posts +number_of_posts: 5 + # Build settings # theme: klise sass: diff --git a/_layouts/home.html b/_layouts/home.html index ad48c25..d147051 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -3,12 +3,12 @@ layout: default home: true --- -

Recent Posts

-{% for post in site.posts %} +

Recent Posts

+{%- for post in site.posts limit: site.number_of_posts -%}
{{ post.date | date: "%b %d, %Y" }}

{{ post.title | escape }}

-{% endfor %} +{%- endfor -%}