1bit.pw/templates/blog/post.html

47 lines
1.5 KiB
HTML

{% extends "content.html" %}
{% import "macros.html" as macros %}
{% import "post_macros.html" as post_macros %}
{% block title %}{{ page.title }} - {{ config.title }}{% endblock %}
{% block content %}
<article itemscope itemtype="http://schema.org/BlogPosting">
<header class="article-header">
<span class="mono info">{{ post_macros::meta(page=page) }}</span>
<h1 itemprop="name headline">{{ page.title }}</h1>
</header>
<div itemprop="articleBody">
{{ page.content | safe }}
</div>
{% block page_footer %}
<footer>
<hr>
<p class="info muted mono">
{% if config.extra.author %}
Published by {{ config.extra.author }}
{% endif %}
{% if page.taxonomies | get(key="blog/categories") %}
{% set categories = page.taxonomies | get(key="blog/categories") %}
in <a href="{{ get_taxonomy_url(kind="blog/categories", name=categories[0]) | safe }}">{{ categories[0] }}</a>
{% endif %}
{% set tags = page.taxonomies | get(key="blog/tags") %}
{% if tags %}
and tagged
{% for tag in tags %}
<a href="{{ get_taxonomy_url(kind="blog/tags", name=tag) | safe }}">{{ tag }}</a>
{% if tags | length > 1 %}
{% if loop.index != tags | length %}
{% if loop.index == tags | length - 1 %}
and
{% else %}
,
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</p>
</footer>
{% endblock page_footer %}
</article>
{% endblock content %}