1
0
Fork 0
forked from github/pelican

Added another option CLEAN_URLS, to use generated files with mod_rewrite and to show nice urls to the end user.

This commit is contained in:
Alexander Artemenko 2010-12-21 00:21:29 +03:00
commit 1d74de2559
3 changed files with 13 additions and 5 deletions

View file

@ -129,7 +129,7 @@ class ArticlesGenerator(Generator):
write('category/%s.html' % cat, templates['category'], self.context,
category=cat, articles=self.categories[cat])
for article in chain(self.translations, self.articles):
write('%s' % article.url,
write(article.save_as,
templates['article'], self.context, article=article,
category=article.category)
@ -211,7 +211,7 @@ class PagesGenerator(Generator):
def generate_output(self, writer):
templates = self.get_templates()
for page in chain(self.translations, self.pages):
writer.write_file('pages/%s' % page.url, templates['page'],
writer.write_file('pages/%s' % page.save_as, templates['page'],
self.context, page=page)