Feat: activate always_modified plugin

This commit is contained in:
2020-06-26 10:25:33 +02:00
parent c7ecf06733
commit ba64771efb
5 changed files with 39 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
# Always Modified
Say you want to sort by modified date/time in a theme template, but not all
your articles have modified date/timestamps explicitly defined in article
metadata. This plugin facilitates that sorting by assuming the modified date
(if undefined) is equal to the created date.
## Usage
1. Add `ALWAYS_MODIFIED = True` to your settings file.
2. Now you can sort by modified date in your templates:
{% for article in articles|sort(reverse=True,attribute='modified') %}