mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
33d9157929
commit
da8b469ab8
5 changed files with 115 additions and 35 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue