1
0
Fork 0
forked from github/pelican

... and add a way to deactivate it.

This commit is contained in:
Alexis Metaireau 2010-11-12 02:18:19 +00:00
commit 4c85555d33
2 changed files with 2 additions and 2 deletions

View file

@ -73,8 +73,7 @@ class ArticlesProcessor(Processor):
if category != '':
metadatas['category'] = unicode(category)
# fallback on filesystem date
if 'date' not in metadatas.keys():
if 'date' not in metadatas.keys() and context['FALLBACK_ON_FS_DATE']:
metadatas['date'] = datetime.fromtimestamp(os.stat(f).st_ctime)
article = Article(content, metadatas, settings=generator.settings,

View file

@ -13,6 +13,7 @@ _DEFAULT_CONFIG = {'PATH': None,
'DISPLAY_PAGES_ON_MENU': True,
'PDF_PROCESSOR': False,
'DEFAULT_CATEGORY': 'misc',
'FALLBACK_ON_FS_DATE': True,
}
def read_settings(filename):