Added a custom package to inject datetime in templates

Modified blog pagination filter to show only posts which pubdate is
less or equal than today's date.
This commit is contained in:
Felipe M 2016-12-20 10:08:40 +01:00
parent 16b4e652bf
commit faf958c401
4 changed files with 34 additions and 0 deletions

View file

@ -12,3 +12,4 @@ slug_format = {{ (this.pub_date|dateformat('YYYY/MM/dd/') if this.pub_date) ~ "-
[pagination]
enabled = yes
per_page = 4
items = this.children.filter(F.pub_date <= datetime.date.today())