mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixed generate filename with article's slug and lang #Ref 1107
This commit is contained in:
parent
91ec0f93c7
commit
177b8ecd0d
1 changed files with 3 additions and 2 deletions
|
|
@ -354,9 +354,10 @@ class ArticlesGenerator(Generator):
|
|||
def generate_drafts(self, write):
|
||||
"""Generate drafts pages."""
|
||||
for article in chain(self.translations, self.drafts):
|
||||
filename = article.save_as
|
||||
filename = article.slug
|
||||
if article.lang != self.settings["DEFAULT_LANG"]:
|
||||
filename + "."+article.lang
|
||||
filename += "-" + article.lang
|
||||
filename += ".html"
|
||||
|
||||
write(os.path.join('drafts', filename),
|
||||
self.get_template(article.template), self.context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue