🐛 fix: avoid empty dates when long_date_format is empty

main
welpo 2 years ago
parent 534969de11
commit eded835d3f
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -105,7 +105,7 @@ language_name.es = "Español"
theme_switcher = true theme_switcher = true
# Date format used when listing posts (main page, /blog section, tag posts list…) # 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" long_date_format = "%d %B %Y"
# Date format used for blog posts. # Date format used for blog posts.

@ -34,7 +34,7 @@
{% else %} {% else %}
{{ date | date(format="%B %Y") }} {{ date | date(format="%B %Y") }}
{% endif %} {% endif %}
{% elif short %} {% else %}
{{ date | date(format="%d %b %Y", locale=date_locale) }} {{ date | date(format="%d %b %Y", locale=date_locale) }}
{% endif %} {% endif %}

Loading…
Cancel
Save