diff options
| author | Dennis Fink | 2026-08-17 19:36:16 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-08-17 20:00:16 +0200 |
| commit | 2b2d89ffd233e331a6985fe762ac339befc972a3 (patch) | |
| tree | 29f4850886342743cfef6231395f66529fb196b2 /templates/blog-post.html | |
| parent | be8614b3c5f63b9e94341166567b9198746f98aa (diff) | |
| download | dennisfink.me-2b2d89ffd233e331a6985fe762ac339befc972a3.tar.gz dennisfink.me-2b2d89ffd233e331a6985fe762ac339befc972a3.zip | |
Add post changelogs
This replaces the manual `updated_date` field with a changelog flow
field so post updates can be recorded as dated entries.
The blog template now derives the "Last updated" metadata from the
latest changelog entry and renders the full changelog in the article
footer, with dedicated styling for compact change notes.
Diffstat (limited to '')
| -rw-r--r-- | templates/blog-post.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/blog-post.html b/templates/blog-post.html index fe751ae..a8eaf37 100644 --- a/templates/blog-post.html +++ b/templates/blog-post.html @@ -13,6 +13,7 @@ {% endfor %} {% set needs_trail_assets = features.trail %} +{% set latest_change = this.changelog.blocks | max(attribute="date") if this.changelog else none %} {% block meta %} {{ super() }} @@ -22,9 +23,9 @@ <meta property="article:published_time" content="{{ this.publication_date }}T00:00:00+02:00"> {% endif %} - {% if this.updated_date %} + {% if latest_change %} <meta property="article:modified_time" - content="{{ this.updated_date }}T00:00:00+02:00"> + content="{{ latest_change.date }}T00:00:00+02:00"> {% endif %} {% if this.category %} {% set category = site.get("/categories/" + this.category) %} @@ -46,8 +47,8 @@ {% set blog_url = '/blog' | url(absolute=True, external=True) %} {% set blog_id = blog_url ~ '#blog' %} {% set modified_date = this.publication_date %} - {% if this.updated_date %} - {% set modified_date = this.updated_date %} + {% if latest_change %} + {% set modified_date = latest_change.date %} {% endif %} {% set post_description = bag('blog.tagline') %} {% if this.description %} |
