This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/blog.html
2015-08-09 01:47:07 +01:00

42 lines
1.2 KiB
HTML

---
layout: default
title: Blog
generator: pagination
pagination:
max_per_page: 10
use:
- posts
---
{% block body_classes %}page--blog page--blog__list{% endblock %}
{% block content %}
<h1>Blog</h1>
<ul class="posts">
{% for post in page.pagination.items %}
<li class="post">
{% include 'post_header' with { page: post, title_tag: 'h2' } %}
{% if post.blocks.excerpt %}
{{ post.blocks.excerpt|raw }}
{% else %}
<p>{{ post.blocks.content|raw|split(' ')|slice(0,50)|join(' ')|replace({ 'h2':'h3' })|raw }} &hellip;</p>
{% endif %}
<a href="{{ post.url }}">Read more &rarr;</a>
</li>
{% endfor %}
</ul>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav>
{% if page.pagination.previous_page %}
<a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer Items</a>
{% endif %}
{% if page.pagination.next_page %}
<a href="{{ site.url }}{{ page.pagination.next_page.url }}">Older Items</a>
{% endif %}
</nav>
{% endif %}
{% endblock %}