lewisdale.dev/src/blog/index.html
2024-01-03 12:50:49 +00:00

37 lines
1.2 KiB
HTML

---
title: Blog
layout: base.njk
pagination:
data: collections.posts
size: 5
reverse: true
---
<main class="wrapper-md stack-lg">
<h1>Blog posts</h1>
<aside class="inverse text-center">
<p>
Subscribe via <a href="/rss.xml">RSS</a>, <a href="/atom.xml">Atom</a>, or <a href="/feed.json">JSON</a>.
</p>
</aside>
<ol class="stack-xl" role='list'>
{% for item in pagination.items %}
<li class="stack-xs">
<h2><a href="{{ item.url }}">{{ item.data.title | safe }}</a></h2>
<time class="block" datetime="{{ item.date | dateToRfc3339 }}">{{ item.date | dateDisplay }}</time>
<div class="e-content p-summary">{{ item.content | excerpt }}</div>
<a href="{{ item.url }}" class="inline-block">Read more</a>
</li>
{% endfor %}
</ol>
<nav class="blog-nav row" data-spacing="between" aria-label="View more posts">
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">Older</a>
{% endif %}
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">Newer</a>
{% endif %}
</nav>
</main>