sass-site/source/blog.liquid

41 lines
989 B
Plaintext
Raw Permalink Normal View History

---
2023-03-08 23:48:53 +01:00
layout: has_no_sidebars
title: Sass Blog
pagination:
data: collections.blog
size: 5
alias: posts
2023-03-03 16:39:31 +01:00
reverse: true
2023-03-08 23:48:53 +01:00
permalink: '/blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber | plus: 1 }}/{% endif %}index.html'
---
2023-03-08 23:48:53 +01:00
{% assign pageNumber = pagination.pageNumber | plus: 1 %}
{% assign pages = pagination.pages.size %}
{% if pages > 1 %}
2023-03-09 17:19:39 +01:00
<p>Page {{ pageNumber }} of {{ pages }}</p>
{% if pagination.href.previous %}
<p>
<a href="{{ pagination.href.previous }}">Previous page</a>
</p>
2023-03-03 16:39:31 +01:00
{% endif %}
2023-03-08 23:48:53 +01:00
{% endif %}
<ul class="sl-c-list">
{% for post in posts %}
2023-03-03 16:39:31 +01:00
<li>
2023-03-09 17:19:39 +01:00
<h2>
<a href="{{ post.url }}">{{ post.data.title }}</a>
</h2>
2023-03-08 23:48:53 +01:00
{% render 'attribution', date: post.date, author: post.data.author %}
2023-03-09 17:19:39 +01:00
{{ post.content | truncateHTML | replaceInternalLinks: post.url }}
2023-03-03 16:39:31 +01:00
</li>
2023-03-08 23:48:53 +01:00
{% endfor %}
</ul>
2023-03-09 17:19:39 +01:00
{% if pagination.href.next %}
<p>
<a href="{{ pagination.href.next }}">Next page</a>
</p>
2023-03-08 23:48:53 +01:00
{% endif %}