39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
---
|
||
layout: layouts/base.njk
|
||
templateClass: tmpl-post
|
||
---
|
||
<h1>{{ title }}</h1>
|
||
|
||
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time>
|
||
{%- for tag in tags | filterTagList %}
|
||
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
||
{%- endfor %}
|
||
|
||
{{ content | safe }}
|
||
|
||
<hr>
|
||
|
||
{% set i18nLinks = page.url | locale_links %}
|
||
{% if i18nLinks.length %}
|
||
<ul>
|
||
<li>
|
||
This page is also available in: <!-- don’t forget to localize this text too -->
|
||
{%- for link in i18nLinks %}
|
||
{%- if not loop.first %},{% endif %}<a href="{{link.url}}" lang="{{link.lang}}" hreflang="{{link.lang}}">{{link.label}}</a>
|
||
{%- endfor -%}
|
||
</li>
|
||
</ul>
|
||
{% endif %}
|
||
|
||
{%- if collections.posts %}
|
||
{%- set previousPost = collections.posts | getPreviousCollectionItem() %}
|
||
{%- set nextPost = collections.posts | getNextCollectionItem() %}
|
||
{%- if nextPost or previousPost %}
|
||
<ul>
|
||
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url | locale_url | url }}">{{ previousPost.data.title }}</a></li>{% endif %}
|
||
{%- if nextPost %}<li>Next: <a href="{{ nextPost.url | locale_url | url }}">{{ nextPost.data.title }}</a></li>{% endif %}
|
||
</ul>
|
||
{%- endif %}
|
||
{%- endif %}
|