volpe/_includes/post.njk

30 lines
No EOL
835 B
Text

---
layout: base.njk
---
<article class="blog-post">
<header class="post-header">
<h1>{{ title }}</h1>
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>
{% if updatedAt and (updatedAt | isMoreThanHourAfter(createdAt)) %}
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateTimeFormat }}">{{ updatedAt | dateTimeFormat }}</time></p>
{% endif %}
</header>
<div class="post-content">
{{ content | safe }}
</div>
{% set postTags = page.inputPath | extractTagsFromFile %}
{% if postTags.length > 0 %}
<section class="post-tags">
<h2>Tags</h2>
<ul class="tag-list">
{% for tag in postTags %}
<li><a href="/tags/{{ tag | lower }}/">#{{ tag }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}
</article>