mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
... and add a way to deactivate it.
This commit is contained in:
parent
7dc847f5b2
commit
4c85555d33
2 changed files with 2 additions and 2 deletions
|
|
@ -73,8 +73,7 @@ class ArticlesProcessor(Processor):
|
||||||
if category != '':
|
if category != '':
|
||||||
metadatas['category'] = unicode(category)
|
metadatas['category'] = unicode(category)
|
||||||
|
|
||||||
# fallback on filesystem date
|
if 'date' not in metadatas.keys() and context['FALLBACK_ON_FS_DATE']:
|
||||||
if 'date' not in metadatas.keys():
|
|
||||||
metadatas['date'] = datetime.fromtimestamp(os.stat(f).st_ctime)
|
metadatas['date'] = datetime.fromtimestamp(os.stat(f).st_ctime)
|
||||||
|
|
||||||
article = Article(content, metadatas, settings=generator.settings,
|
article = Article(content, metadatas, settings=generator.settings,
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ _DEFAULT_CONFIG = {'PATH': None,
|
||||||
'DISPLAY_PAGES_ON_MENU': True,
|
'DISPLAY_PAGES_ON_MENU': True,
|
||||||
'PDF_PROCESSOR': False,
|
'PDF_PROCESSOR': False,
|
||||||
'DEFAULT_CATEGORY': 'misc',
|
'DEFAULT_CATEGORY': 'misc',
|
||||||
|
'FALLBACK_ON_FS_DATE': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
def read_settings(filename):
|
def read_settings(filename):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue