mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
41 lines
989 B
Plaintext
41 lines
989 B
Plaintext
---
|
|
layout: has_no_sidebars
|
|
title: Sass Blog
|
|
pagination:
|
|
data: collections.blog
|
|
size: 5
|
|
alias: posts
|
|
reverse: true
|
|
permalink: '/blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber | plus: 1 }}/{% endif %}index.html'
|
|
---
|
|
|
|
{% assign pageNumber = pagination.pageNumber | plus: 1 %}
|
|
{% assign pages = pagination.pages.size %}
|
|
|
|
{% if pages > 1 %}
|
|
<p>Page {{ pageNumber }} of {{ pages }}</p>
|
|
{% if pagination.href.previous %}
|
|
<p>
|
|
<a href="{{ pagination.href.previous }}">Previous page</a>
|
|
</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<ul class="sl-c-list">
|
|
{% for post in posts %}
|
|
<li>
|
|
<h2>
|
|
<a href="{{ post.url }}">{{ post.data.title }}</a>
|
|
</h2>
|
|
{% render 'attribution', date: post.date, author: post.data.author %}
|
|
{{ post.content | truncateHTML | replaceInternalLinks: post.url }}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% if pagination.href.next %}
|
|
<p>
|
|
<a href="{{ pagination.href.next }}">Next page</a>
|
|
</p>
|
|
{% endif %}
|