newblog/templates/categories/single.html

31 lines
1 KiB
HTML
Raw Normal View History

2024-07-01 15:20:09 +02:00
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
{%- block seo %}
{{- super() }}
{%- set title = term.name ~ " category" %}
{%- if config.title %}
{%- set title_addition = title_separator ~ config.title %}
{%- else %}
{%- set title_addition = "" %}
{%- endif %}
{%- set description = config.description %}
{{- macros_seo::seo(config=config, title=title, title_addition=title_addition, description=description, is_home=true) }}
{%- endblock seo %}
{%- block content %}
<div>
<h2>{{ term.name }}</h2>
{%- for year, posts in term.pages | group_by(attribute="year") %}
<h3>{{ year }}</h3>
{%- for page in posts %}
<p><a href="{{ page.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p>
{%- endfor %}
{%- endfor %}
</div>
{%- endblock content %}