Fix #1647: Fix ARTICLE_ORDER_BY and add the ability to reverse order

ARTICLE_ORDER_BY wasn't doing anything because the ArticlesGenerator
was sorting articles after ARTICLE_ORDER_BY was applied. This fixes
that by adding the ability to reverse metadata order by adding the
option prefix 'reversed-' to metadata and changing the default value
to 'reversed-date'.

Relevant documentation is also updated and moved into a more appropriate
place ('Ordering Content' instead of 'URL settings').
This commit is contained in:
Deniz Turgut 2015-06-12 17:15:19 -04:00
commit da8b469ab8
5 changed files with 115 additions and 35 deletions

View file

@ -65,7 +65,7 @@ DEFAULT_CONFIG = {
'OUTPUT_RETENTION': [],
'ARTICLE_URL': '{slug}.html',
'ARTICLE_SAVE_AS': '{slug}.html',
'ARTICLE_ORDER_BY': 'slug',
'ARTICLE_ORDER_BY': 'reversed-date',
'ARTICLE_LANG_URL': '{slug}-{lang}.html',
'ARTICLE_LANG_SAVE_AS': '{slug}-{lang}.html',
'DRAFT_URL': 'drafts/{slug}.html',