PierrePaul / html5-dopetrope

Pelican theme based on html5-dopetrope design.
Other
58 stars 17 forks source link

Please use article.locale_date instead of article.date #15

Closed inktrap closed 7 years ago

inktrap commented 7 years ago

I would like to customize the date while using this theme. This works with article.locale_date instead of article.date.

locale_date | Date formatted by the date_format. Source. As a consequence: Either date_format is set and locale_date will give the locale specific output, or the default date format is used anyway.

See this bugreport which is the same issue for the notmyidea theme

PierrePaul commented 7 years ago

Thanks

inktrap commented 7 years ago

Uh and related: Please do not provide a hard-coded format for the date in article.html:

themes/html5-dopetrope/templates/article.html:                                  <div class="pennant pennant-alt date">{{ article.date|strftime('%Y-%m-%d') }}</div>
inktrap commented 7 years ago

Btw: your fix is wrong: it is page.locale_date or article.locale_date not locale_date.

PierrePaul commented 7 years ago

I guess that serves me right for committing and pushing before leaving the office. Thanks. I also made some changes to the styling so it doesnt look too ugly, since Im no longer extracting the date manually.

inktrap commented 7 years ago

Meh, we have all done that :) Thanks!