1
0
Fork 0
forked from github/pelican

Create a Tag class which has a url property

This commit is contained in:
Kyle Fuller 2011-12-22 15:43:44 +00:00
commit f9ed01bb64
4 changed files with 24 additions and 4 deletions

View file

@ -179,7 +179,7 @@ class ArticlesGenerator(Generator):
for tag, articles in self.tags.items():
articles.sort(key=attrgetter('date'), reverse=True)
dates = [article for article in self.dates if article in articles]
write('tag/%s.html' % tag, tag_template, self.context, tag=tag,
write(tag.url, tag_template, self.context, tag=tag,
articles=articles, dates=dates,
paginated={'articles': articles, 'dates': dates},
page_name='tag/%s' % tag)