sass-site/source/blog.liquid

32 lines
708 B
Plaintext
Raw Normal View History

---
pagination:
data: collections.blog
size: 5
alias: posts
2023-03-03 16:39:31 +01:00
reverse: true
layout: blog
title: Sass Blog
---
Page {{ pagination.pageNumber | plus: 1 }} of {{ pagination.size }}
<ul>
2023-03-03 16:39:31 +01:00
{% if pagination.href.previous %}
<li>
<a href="{{ pagination.href.previous }}">Previous</a>
</li>
{% endif %}
{%- for post in posts -%}
<li>
<h2>
<a href="{{post.url}}">{{ post.data.title }}</a>
</h2>
2023-03-03 16:39:31 +01:00
<p>Posted at {{ post.data.date }} by {{ post.data.author }}</p>
<p>{{ post.content | truncatewords: 250 }}</p>
</li>
{%- endfor -%}
2023-03-03 16:39:31 +01:00
{% if pagination.href.next %}
<li>
<a href="{{ pagination.href.next }}">Next</a>
2023-03-03 16:39:31 +01:00
</li>
{% endif %}
</ul>