mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update generators.py
Allow the use of {category}, {author} and/or {lang} for period archive generations.
This commit is contained in:
parent
d9bbdf7f07
commit
75fa793b5a
1 changed files with 9 additions and 1 deletions
|
|
@ -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']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue