From a6ac7d2616303a2243afb907243b700e9c8bd838 Mon Sep 17 00:00:00 2001 From: Teo-CD Date: Sat, 22 May 2021 23:25:37 +0100 Subject: [PATCH] Add last update time to article view Would be nice to add it to the article list, do not know how to yet. --- templates/post_macros.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/templates/post_macros.html b/templates/post_macros.html index b460bf1..7f532ce 100644 --- a/templates/post_macros.html +++ b/templates/post_macros.html @@ -15,7 +15,15 @@

- {{ page.date | date(format="%F") }} + {% if page.updated %} + {% set latest_date = page.updated -%} + {% else %} + {% set latest_date = page.date -%} + {% endif %} + + {% if latest_date %} + {{ latest_date | date(format="%F") }} + {% endif %} {% if page.taxonomies.authors %} {% for author in page.taxonomies.authors %} @@ -64,7 +72,7 @@

- Published + First published on {{self::post_footer_date(page=page)}} {{self::post_footer_authors(page=page)}} {{self::post_footer_categories(page=page)}} @@ -140,4 +148,4 @@ and {% endif %} {% endfor %} {% endif %} -{% endmacro post_footer_tags %} \ No newline at end of file +{% endmacro post_footer_tags %}