forked from github/pelican
Added USE_FOLDER_AS_CATEGORY setting.
This allows users to organize their files in ways where the subfolder name would not make a good category name (i.e. /2012/09/). Set this to ``False`` and the subfolder will no longer be used as a standard category, `DEFAULT_CATEGORY` will be used instead.
This commit is contained in:
parent
a282499055
commit
47c972e21a
5 changed files with 17 additions and 6 deletions
|
|
@ -121,7 +121,8 @@ class Page(object):
|
|||
'lang': getattr(self, 'lang', 'en'),
|
||||
'date': getattr(self, 'date', datetime.now()),
|
||||
'author': self.author,
|
||||
'category': getattr(self, 'category', 'misc'),
|
||||
'category': getattr(self, 'category',
|
||||
self.settings['DEFAULT_CATEGORY']),
|
||||
}
|
||||
|
||||
def _expand_settings(self, key):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue