chiark / gitweb /
theme: article header date formatting should not depend on DATE_FORMATS.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 30 Oct 2017 10:50:42 +0000 (11:50 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 30 Oct 2017 10:51:35 +0000 (11:51 +0100)
It's affected only by the locale in it, but that's desired.

pelican-theme/templates/article_header.html

index cc3be45e73cb8247f564dabb49f0c5adcd95dced..fd782411bc14dad9f958eb2ea360e7a5d383cc3e 100644 (file)
@@ -1,7 +1,7 @@
 <header>
   <h1><a href="{{ article.url|format_siteurl }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
     <time class="m-date" datetime="{{ article.date.isoformat() }}">
-      {% set month, day, year = article.locale_date.split(' ') %}
+      {% set month, day, year = article.date.strftime('%b %d %Y').split(' ') %}
       {{ month }} <span class="m-date-day">{{ day }}</span> {{year}}
     </time>
     {{ article.title }}