blog/templates/links.html

25 lines
948 B
HTML

{% extends "base.html" %}
{%- block content %}
{%- set english_section = get_section(path="links/_index.md", lang="en") %}
<h1 class="title">{{ section.title }}</h1>
<ul id="posts">
{%- for page in english_section.pages %}
<li>
{%- if page.content -%}
{%- set portuguese_page = get_page(path="links/" ~ page.slug ~ ".pt.md") %}
<time class="post-date"><a href="
{%- if lang == "pt" -%}
{{ portuguese_page.permalink -}}
{%- else -%}
{{ page.permalink -}}
{%- endif -%}
">{{ page.date | date(format="%Y-%m-%d") -}}</a></time>
{%- else %}
<time class="post-date">{{ page.date | date(format="%Y-%m-%d") }}</time>
{%- endif %}
<a href="{{ page.extra.url | safe }}">{{ page.title }}</a>
</li>
{%- endfor %}
</ul>
{%- endblock content %}