Update generators.py

Allow the use of {category}, {author} and/or {lang} for period archive generations.
This commit is contained in:
Fernando Flórez 2014-03-23 13:56:14 -05:00
commit 75fa793b5a

View file

@ -304,7 +304,15 @@ class ArticlesGenerator(Generator):
# format string syntax can be used for specifying the
# period archive dates
date = archive[0].date
save_as = save_as_fmt.format(date=date)
category = archive[0].category
lang = archive[0].lang
author = archive[0].author
save_as = save_as_fmt.format(
date=date,
category=category,
lang=lang,
author=author
)
context = self.context.copy()
if key == period_date_key['year']: