From 1ca0c21e98e52c50e4ed0ddda757ddd7a89af537 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Fri, 3 Dec 2021 21:56:45 +0100 Subject: [PATCH] Only print page info when there is date available Useful for sub-pages which do not necessarily have such metadata. --- templates/macros.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/macros.html b/templates/macros.html index 693d833..7561f2f 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -17,10 +17,12 @@ {% endmacro %} {% macro page_info(page) %} -
- {{ page.date }} - {%- if page.extra.author -%} - , {{ page.extra.author }} - {% endif %} -
+ {% if page.date %} +
+ {{ page.date }} + {%- if page.extra.author -%} + , {{ page.extra.author }} + {% endif %} +
+ {% endif %} {% endmacro %}