add latest new section to frontpage

We use a custom override template (jinja) to generate a suitable list of
new items.

Also added first text for announcing our new user docs
This commit is contained in:
2026-01-09 10:57:58 +01:00
parent 8c0f9e3c21
commit 7add1a6e0b
4 changed files with 45 additions and 1 deletions

18
overrides/frontpage.html Normal file
View File

@@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block content %}
{{ super() }}
<!-- latest news requires that we have the blog plugin configured! -->
{% if pages %}
<h2 id="latest-news">Latest News</h2>
<ul class="frontpage_style">
{# we only capture the two newest entries #}
{% for file in (pages | selectattr('page.meta.date') | sort(attribute='page.meta.date.created', reverse=true))[:2] %}
<li><a href="{{ file.dest_uri }}">{{ file.page.title }}</a> &ndash; <time datetime="{{ file.page.meta.date.created }}"> {{- file.page.meta.date.created | date -}}</time></li>
{% endfor %}
</ul>
{# TODO we should try using the pages object to always get the correct relative uri #}
<p>&rarr; See <a href="/news/index.html">News</a> for more...</p>
{% endif %}
{% endblock %}