From 3332196ec548e472bc0f7019b13c396df46d4126 Mon Sep 17 00:00:00 2001 From: Mohamed Akram Date: Sat, 25 Jan 2020 19:17:46 +0400 Subject: [PATCH] Allow using theme without pagination (#2378) --- _layouts/home.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_layouts/home.html b/_layouts/home.html index d1428ebb..fa098d87 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -6,7 +6,13 @@ layout: archive

{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}

-{% for post in paginator.posts %} +{% if site.paginate %} + {% assign posts = paginator.posts %} +{% else %} + {% assign posts = site.posts %} +{% endif %} + +{% for post in posts %} {% include archive-single.html %} {% endfor %}