devon.lol/src/blog/index.njk
2024-06-17 13:50:52 -04:00

36 lines
1.3 KiB
Text

---
title: Devon's Blog
onpageTitle: Blog
layout: article.njk
pagination:
data: collections.post
size: 5
alias: posts
reverse: true
---
<p>The posts here are sorted by recently modified. That means that if I update a post, it will float back to the top. I'll try to update the excerpts to reflect the changes made.</p>
<ul class="post-list h-feed">
<span class="p-name hidden">Devon.LoL Blog</span>
{%- for post in posts -%}
<li class="h-entry">
<h2><a href="{{ post.url }}" class="u-url p-name">{{ post.data.title }}</a></h2>
<small>Last updated {{ post.date | formatDatetimeForHumans }}</small>
<p>{{ post.data.excerpt }}</p>
</li>
{%- endfor -%}
<a class="p-author h-card hidden" href="/">Devon Campbell</a>
</ul>
<nav aria-labelledby="pagination-heading" class="pagination">
<h2 id="pagination-heading" class="sr-only">Paging Controls</h2>
{% if pagination.href.previous or pagination.href.next %}
<ol>
{% if pagination.href.previous %}<li class="newer-item"><a href="{{ pagination.href.previous }}" rel="prev">Newer</a></li>{% endif %}
{%- for pageEntry in pagination.pages %}
{%- endfor %}
{% if pagination.href.next %}<li class="older-item"><a href="{{ pagination.href.next }}" rel="next">Older</a></li>{% endif %}
</ol>
{% endif %}
</nav>