From 7b9a52f9bbd38f3b37217f665c9f5654b4b9be1f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 6 Oct 2016 15:54:47 +0200 Subject: Set copyright date to modified date of latest article If this happens to be available, i.e. if the article has a 'modified' date. --- pelican-bootstrap3/templates/includes/footer.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pelican-bootstrap3/templates/includes/footer.html b/pelican-bootstrap3/templates/includes/footer.html index ccd951b..b792835 100644 --- a/pelican-bootstrap3/templates/includes/footer.html +++ b/pelican-bootstrap3/templates/includes/footer.html @@ -3,7 +3,11 @@
{% if articles %} - {% set copy_date = articles[0].date.strftime('%Y') %} + {% if articles[0].modified %} + {% set copy_date = articles[0].modified.strftime('%Y') %} + {% else %} + {% set copy_date = articles[0].date.strftime('%Y') %} + {% endif %} {% else %} {% set copy_date = '' %} {% endif %} -- cgit