added ability to switch off pagination on the blog page (#1909)

This commit is contained in:
Dinesh Natesan 2023-12-24 18:46:14 -08:00 committed by GitHub
parent a1a9250b93
commit 6119d0657c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -95,7 +95,14 @@ pagination:
{% endif %}
<ul class="post-list">
{% for post in paginator.posts %}
{%- if page.pagination.enabled -%}
{%- assign postlist = paginator.posts -%}
{%- else -%}
{%- assign postlist = site.posts -%}
{%- endif -%}
{% for post in postlist %}
{% if post.external_source == blank %}
{% assign read_time = post.content | number_of_words | divided_by: 180 | plus: 1 %}
@ -163,6 +170,8 @@ pagination:
{% endfor %}
</ul>
{% include pagination.html %}
{%- if page.pagination.enabled -%}
{%- include pagination.html -%}
{%- endif -%}
</div>