Fixed critical build error when translated versions of article has same slug. Ref #1107

This commit is contained in:
mimu 2013-10-05 16:16:51 +09:00
commit 5fd8c2fff0

View file

@ -353,8 +353,8 @@ class ArticlesGenerator(Generator):
def generate_drafts(self, write):
"""Generate drafts pages."""
for article in self.drafts:
write(os.path.join('drafts', '%s.html' % article.slug),
for article in chain(self.translations, self.drafts):
write(os.path.join('drafts', article.save_as),
self.get_template(article.template), self.context,
article=article, category=article.category,
all_articles=self.articles)