cheddar
·
2025-04-18
post.njk
1---
2layout: layouts/base.njk
3---
4<article>
5 <h1 class="post-title">{{ title }}</h1>
6 <div class="about">
7 <address>by <a href="{{ author.url or metadata.author.url }}">
8 {{ author.name or metadata.author.name }}
9 </a></address>
10 <time datetime="{{ page.date | htmlDateString }}">published {{ page.date | readableDate }}</time>
11 {% if series %}
12 <aside>This article is part of a series - <a href="#seriesNav">{{ series.name }}</a></aside>
13 {% endif %}
14 </div>
15 {{ content | safe }}
16</article>
17{% if collections.posts %}
18{% set previousPost = collections.posts | getPreviousCollectionItem %}
19{% set nextPost = collections.posts | getNextCollectionItem %}
20{% if nextPost or previousPost %}
21<nav name="Article Navigation">
22 <ol class="simple-list">
23 {% if previousPost %}<li>Previous: <a href="{{ previousPost.url}}">{{ previousPost.data.title }}</a></li>{% endif %}
24 {% if nextPost %}<li>Next: <a href="{{ nextPost.url}}">{{ nextPost.data.title }}</a></li>{% endif %}
25 </ol>
26</nav>
27{% endif %}
28{% endif %}
29{% if series %}
30<hr>
31{% set seriesName = series.name %}
32<a id="seriesNav"></a>
33{% include "series_list.njk" %}
34{% endif %}