crisp-theme/_includes/layouts/post.njk

34 lines
1.1 KiB
Text
Raw Normal View History

2025-04-16 22:47:29 -04:00
---
layout: layouts/base.njk
---
<article>
<h1>{{ title }}</h1>
2025-04-18 11:28:28 -04:00
<div class="about">
<address>by <a href="{{ author.url or metadata.author.url }}">
{{ author.name or metadata.author.name }}
</a></address>
<time datetime="{{ page.date | htmlDateString }}">published {{ page.date | readableDate }}</time>
{% if series %}
<aside>This article is part of a series - <a href="#seriesNav">{{ series.name }}</a></aside>
{% endif %}
</div>
2025-04-16 22:47:29 -04:00
{{ content | safe }}
</article>
{% if collections.posts %}
{% set previousPost = collections.posts | getPreviousCollectionItem %}
{% set nextPost = collections.posts | getNextCollectionItem %}
{% if nextPost or previousPost %}
<nav name="Article Navigation">
2025-04-18 11:28:28 -04:00
<ol class="simple-list">
{% if previousPost %}<li>Previous: <a href="{{ previousPost.url}}">{{ previousPost.data.title }}</a></li>{% endif %}
{% if nextPost %}<li>Next: <a href="{{ nextPost.url}}">{{ nextPost.data.title }}</a></li>{% endif %}
2025-04-16 22:47:29 -04:00
</ol>
</nav>
{% endif %}
{% endif %}
{% if series %}
2025-04-18 11:28:28 -04:00
<hr>
2025-04-16 22:47:29 -04:00
{% set seriesName = series.name %}
2025-04-18 12:16:26 -04:00
{% include "series_list.njk" %}
2025-04-16 22:47:29 -04:00
{% endif %}