From eded835d3fcfce781393dd4f448ef907fd916316 Mon Sep 17 00:00:00 2001 From: welpo Date: Tue, 23 May 2023 22:59:47 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20avoid=20empty=20dates=20w?= =?UTF-8?q?hen=20long=5Fdate=5Fformat=20is=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.toml | 2 +- templates/macros/format_date.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 87fdf4c..241294b 100644 --- a/config.toml +++ b/config.toml @@ -105,7 +105,7 @@ language_name.es = "Español" theme_switcher = true # Date format used when listing posts (main page, /blog section, tag posts list…) -# Default is "6th July 2049". +# Default is "6th July 2049" in English and "%d %B %Y" in other languages. long_date_format = "%d %B %Y" # Date format used for blog posts. diff --git a/templates/macros/format_date.html b/templates/macros/format_date.html index 9f89aed..ea88bb5 100644 --- a/templates/macros/format_date.html +++ b/templates/macros/format_date.html @@ -34,7 +34,7 @@ {% else %} {{ date | date(format="%B %Y") }} {% endif %} -{% elif short %} +{% else %} {{ date | date(format="%d %b %Y", locale=date_locale) }} {% endif %}