Files
andwati.com/templates/archive.html
T
2026-07-17 13:59:48 +03:00

42 lines
1.9 KiB
HTML

{% extends "base.html" %} {% block title %}{{ section.title }} | {{ config.title }}{% endblock title
%} {% block description %}Chronological archive of every post on {{ config.title }}.{% endblock
description %} {% block canonical %}{{ section.permalink }}{% endblock canonical %} {% block og_title
%}{{ section.title }} | {{ config.title }}{% endblock og_title %} {% block og_description %}Chronological
archive of every post on {{ config.title }}.{% endblock og_description %} {% block og_url %}{{
section.permalink }}{% endblock og_url %} {% block head %}
<!-- SEO: BreadcrumbList JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
{ "@type": "ListItem", "position": 2, "name": {{ section.title | json_encode | safe }}, "item": "{{ section.permalink | safe }}" }
]
}
</script>
{% endblock head %} {% block content %}
<div class="post-detail">
<header class="post-header list-page-header">
<h1 class="post-title list-page-title">{{ config.extra.archive_page_title | default(value="Archive") }}</h1>
</header>
<div class="archive-list">
{% set section = get_section(path="posts/_index.md") %} {% for year, posts in section.pages |
sort(attribute="date") | reverse | group_by(attribute="year") %}
<div class="archive-year">
<h2 class="archive-year-title">{{ year }}</h2>
<ul class="archive-items">
{% for post in posts %}
<li class="archive-item hover-scale">
<time datetime="{{ post.date }}" class="archive-date">{{ post.date | date(format="%d-%b") }}</time>
<a href="{{ post.permalink }}" class="archive-link">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
{% endblock content %}