forked from github/pelican
Support ordering pages and articles when iterating in templates.
Order can be set to a metadata attribute or a sorting function. Default to order by slug for articles and order by filename for pages.
This commit is contained in:
parent
3b0823f5e6
commit
0c69f4ad84
4 changed files with 43 additions and 3 deletions
|
|
@ -57,10 +57,12 @@ DEFAULT_CONFIG = {
|
|||
'OUTPUT_RETENTION': (),
|
||||
'ARTICLE_URL': '{slug}.html',
|
||||
'ARTICLE_SAVE_AS': '{slug}.html',
|
||||
'ARTICLE_ORDER_BY': 'slug',
|
||||
'ARTICLE_LANG_URL': '{slug}-{lang}.html',
|
||||
'ARTICLE_LANG_SAVE_AS': '{slug}-{lang}.html',
|
||||
'PAGE_URL': 'pages/{slug}.html',
|
||||
'PAGE_SAVE_AS': os.path.join('pages', '{slug}.html'),
|
||||
'PAGE_ORDER_BY': 'filename',
|
||||
'PAGE_LANG_URL': 'pages/{slug}-{lang}.html',
|
||||
'PAGE_LANG_SAVE_AS': os.path.join('pages', '{slug}-{lang}.html'),
|
||||
'STATIC_URL': '{path}',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue