Commits

Alexis Metaireau committed 7063c7a

... and add a way to deactivate it.

Comments (0)

Files changed (2)

pelican/processors.py

                 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,

pelican/settings.py

                    'DISPLAY_PAGES_ON_MENU': True,
                    'PDF_PROCESSOR': False,
                    'DEFAULT_CATEGORY': 'misc',
+                   'FALLBACK_ON_FS_DATE': True,
                   }
 
 def read_settings(filename):