diff --git a/pelican/processors.py b/pelican/processors.py index b532ead1..323be16d 100644 --- a/pelican/processors.py +++ b/pelican/processors.py @@ -69,6 +69,9 @@ class ArticlesProcessor(Processor): category = os.path.dirname(f).replace( os.path.expanduser(generator.path)+'/', '') + if category == generator.path: + category = context['DEFAULT_CATEGORY'] + if category != '': metadatas['category'] = unicode(category) diff --git a/pelican/settings.py b/pelican/settings.py index 3c97bd42..0838e856 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -12,6 +12,7 @@ _DEFAULT_CONFIG = {'PATH': None, 'SITENAME': 'A Pelican Blog', 'DISPLAY_PAGES_ON_MENU': True, 'PDF_PROCESSOR': False, + 'DEFAULT_CATEGORY': 'misc', } def read_settings(filename):