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
179c79bf71
commit
2bdd1b28a4
1 changed files with 8 additions and 1 deletions
|
|
@ -322,7 +322,14 @@ class ArticlesGenerator(Generator):
|
|||
# Let date.__format__() work with byte strings instead of characters since it fails to work with characters
|
||||
bytes_save_as_fmt = save_as_fmt.encode('utf8')
|
||||
bytes_save_as = bytes_save_as_fmt.format(date=date)
|
||||
save_as = unicode(bytes_save_as,'utf8')
|
||||
save_as = unicode(bytes_save_as, 'utf8')
|
||||
category = archive[0].category
|
||||
lang = archive[0].lang
|
||||
save_as = save_as_fmt.format(
|
||||
date=date,
|
||||
category=category,
|
||||
lang=lang
|
||||
)
|
||||
context = self.context.copy()
|
||||
|
||||
if key == period_date_key['year']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue