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 865ce6dd34
commit a1c009de6e
4 changed files with 45 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
hide: hide:
- navigation - navigation
- toc - toc
template: "frontpage.html"
--- ---
# HPCE User Documentation # HPCE User Documentation
@@ -20,3 +21,5 @@ researchers, staff, and external collaborators, such as the Merlin series of
HPC clusters. Furthermore the HPCE group engages in research activities on HPC clusters. Furthermore the HPCE group engages in research activities on
technologies (data analysis and machine learning technologies) used on these technologies (data analysis and machine learning technologies) used on these
systems. systems.
<!-- note that further content is dynamically added via the overrides/frontpage.html template -->

View File

@@ -0,0 +1,22 @@
---
date:
created: 2026-01-12
tags:
- getting_started
- draft
---
# New User Documentation Site
Starting in 2026, we are changing the design of the user documentation website.
Previously we had used the [documentation
theme](https://github.com/tomjoht/documentation-theme-jekyll) together with the
[Jykell SSG](https://jekyllrb.com/), but have now switch to the more modern
[Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme and
SSG engine. This comes with a few improvements:
* searching is more complete and provides better results
* theme related improvements (day-night coloring, page layout, content formatting)
* edits for pages can be submitted via the *Edit* (this will direct you to the Gitea repository which hosts the documentation)
TBD

View File

@@ -3,7 +3,7 @@ site_name: HPCE User Documentation
site_url: https://hpce.pages.psi.ch site_url: https://hpce.pages.psi.ch
# Repository # Repository
repo_name: hpce-userdocs repo_name: "User Documentation Repository"
repo_url: https://gitea.psi.ch/hpce/gitea-pages repo_url: https://gitea.psi.ch/hpce/gitea-pages
# TODO unsure if this works, branch needs to be changed from `mkdocs` to `main` # TODO unsure if this works, branch needs to be changed from `mkdocs` to `main`
edit_uri: _edit/mkdocs/docs/ edit_uri: _edit/mkdocs/docs/
@@ -16,6 +16,7 @@ theme:
name: material name: material
favicon: images/favicon.ico favicon: images/favicon.ico
logo: images/hpce_logo.png logo: images/hpce_logo.png
custom_dir: overrides
features: features:
- navigation.instant - navigation.instant
- navigation.tabs - navigation.tabs

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 %}