mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
change default value for DEFAULT_DATE to None
(was 'fs' => guess from file mtime)
This commit is contained in:
parent
d9fbb540c5
commit
fa82e19c1f
3 changed files with 2 additions and 3 deletions
|
|
@ -43,7 +43,7 @@ Setting name (default value) What doe
|
||||||
`DISPLAY_PAGES_ON_MENU` (``True``) Whether to display pages on the menu of the
|
`DISPLAY_PAGES_ON_MENU` (``True``) Whether to display pages on the menu of the
|
||||||
template. Templates may or not honor this
|
template. Templates may or not honor this
|
||||||
setting.
|
setting.
|
||||||
`DEFAULT_DATE` (``fs``) The default date you want to use.
|
`DEFAULT_DATE` (``None``) The default date you want to use.
|
||||||
If 'fs', Pelican will use the file system
|
If 'fs', Pelican will use the file system
|
||||||
timestamp information (mtime) if it can't get
|
timestamp information (mtime) if it can't get
|
||||||
date information from the metadata.
|
date information from the metadata.
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ class ArticlesGenerator(Generator):
|
||||||
if category != '':
|
if category != '':
|
||||||
metadata['category'] = Category(category, self.settings)
|
metadata['category'] = Category(category, self.settings)
|
||||||
|
|
||||||
if 'date' not in metadata and self.settings['DEFAULT_DATE']:
|
if 'date' not in metadata and self.settings.get('DEFAULT_DATE'):
|
||||||
if self.settings['DEFAULT_DATE'] == 'fs':
|
if self.settings['DEFAULT_DATE'] == 'fs':
|
||||||
metadata['date'] = datetime.datetime.fromtimestamp(
|
metadata['date'] = datetime.datetime.fromtimestamp(
|
||||||
os.stat(f).st_ctime)
|
os.stat(f).st_ctime)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ _DEFAULT_CONFIG = {'PATH': '.',
|
||||||
'OUTPUT_SOURCES_EXTENSION': '.text',
|
'OUTPUT_SOURCES_EXTENSION': '.text',
|
||||||
'USE_FOLDER_AS_CATEGORY': True,
|
'USE_FOLDER_AS_CATEGORY': True,
|
||||||
'DEFAULT_CATEGORY': 'misc',
|
'DEFAULT_CATEGORY': 'misc',
|
||||||
'DEFAULT_DATE': 'fs',
|
|
||||||
'WITH_FUTURE_DATES': True,
|
'WITH_FUTURE_DATES': True,
|
||||||
'CSS_FILE': 'main.css',
|
'CSS_FILE': 'main.css',
|
||||||
'NEWEST_FIRST_ARCHIVES': True,
|
'NEWEST_FIRST_ARCHIVES': True,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue