web/_includes/post.njk
tenkuma e25855b121
All checks were successful
Build Eleventy Forgero / build (24.x) (push) Successful in 36s
Make language link pass through URL filter to apply pathPrefix.
2026-05-15 11:01:52 -03:00

30 lines
No EOL
1.1 KiB
Text

---
layout: base.njk
title: Adrian Victor:Blog
---
{% set altLanguages = collections.post | alternateLanguages(postId, langKey) %}
{% from "macros.njk" import videoCard with context %}
<main>
<article>
<div id="postHeader">
<h1>{{ postTitle }}</h1>
<p>{{ authors or "Adrian Victor" }} - <b>{{ date | postDate }}</b>{% if lastModified | postDate !== date | postDate %} ({{ i18n[langKey].lastEditedIn }} {{ lastModified | postDate }}){% endif %}</p>
{% if altLanguages.length > 0 %}
{{ i18n[langKey].availableInOtherLanguages }}:
{% for alt in altLanguages %}
<li class="inlineList">
<a href="{{ alt.url | url }}" hreflang="{{ alt.lang }}">
{{ i18n[alt.lang].language }}
</a>
</li>
{% endfor %}
{% endif %}
</div>
{% if postVideoLink and postVideoImage and postVideoTitle and postVideoWebsite %}
{{ videoCard(postVideoLink, postVideoTitle, postVideoImage, postVideoWebsite, postVideoDuration) }}
{% endif %}
{{ content | safe }}
</article>
</main>