Skip to content

Commit

Permalink
added ability to switch off pagination on the blog page (alshedivat#1909
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AbstractGeek authored Dec 25, 2023
1 parent a1a9250 commit 6119d06
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ <h3 class="card-title text-lowercase">{{ post.title }}</h3>
{% 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 %}
Expand Down Expand Up @@ -163,6 +170,8 @@ <h3>
{% endfor %}
</ul>

{% include pagination.html %}
{%- if page.pagination.enabled -%}
{%- include pagination.html -%}
{%- endif -%}

</div>

0 comments on commit 6119d06

Please sign in to comment.