mestizo.monster/_includes/post.njk

45 lines
1.2 KiB
Text

---
layout: base.njk
---
{% set previousPost = collections.post | getPreviousCollectionItem %}
{% set nextPost = collections.post | getNextCollectionItem %}
<section>
<nav>
<a href="/">home</a> > <a href="/posts">posts</a> > <a href="{{ page.url }}">{{ title }}</a>
</nav>
</section>
<main>
<article>
<hgroup>
<h1>{{ title }}</h1>
<p>{{ description }}</p>
<ul>
<li><strong>author:</strong> <a href="/about">daniel a. gallegos (taco)</a></li>
<li><strong>reading time:</strong> about {{ content | readingTime }}</li>
<li><strong>published:</strong> {{ date }}</li>
</ul>
</hgroup>
<section>{{ content | safe }}</section>
<nav>
<ol>
<li>
previously... <br />{% if previousPost %}
<a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a>
{% else %}
...not much.
{% endif %}
</li>
<li>
...up next<br />{% if nextPost %}
<a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a>
{% else %}
...who knows?
{% endif %}
</li>
</ol>
</nav>
</article>
</main>