xmitter-11ty/_includes/layouts/post.njk

26 lines
850 B
Plaintext
Raw Normal View History

2018-01-16 22:08:47 -05:00
---
layout: layouts/base.njk
templateClass: tmpl-post
---
<h1>{{ title }}</h1>
2021-03-17 17:29:07 -04:00
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time>
2021-03-19 21:38:32 -04:00
{%- for tag in tags | filterTagList -%}
{%- set tagUrl %}/tags/{{ tag | slug }}/{% endset -%}
2021-03-17 17:29:07 -04:00
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
{%- endfor %}
{{ content | safe }}
2021-07-28 09:57:46 -04:00
{%- if collections.posts %}
2021-03-17 11:29:29 -04:00
{%- set nextPost = collections.posts | getNextCollectionItem(page) %}
{%- set previousPost = collections.posts | getPreviousCollectionItem(page) %}
2021-03-17 17:29:07 -04:00
{%- if nextPost or previousPost %}
2020-07-27 16:19:01 -04:00
<hr>
<ul>
{%- if nextPost %}<li>Next: <a href="{{ nextPost.url | url }}">{{ nextPost.data.title }}</a></li>{% endif %}
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a></li>{% endif %}
</ul>
2021-03-17 17:29:07 -04:00
{%- endif %}
2021-07-28 09:57:46 -04:00
{%- endif %}