mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #662 from wking/rich-urlwrapper-comparisons
contents: Add rich comparisons to URLWrapper for easy sorting
This commit is contained in:
commit
d9855ae346
4 changed files with 64 additions and 5 deletions
|
|
@ -416,11 +416,10 @@ class ArticlesGenerator(Generator):
|
|||
# order the categories per name
|
||||
self.categories = list(self.categories.items())
|
||||
self.categories.sort(
|
||||
key=lambda item: item[0].name,
|
||||
reverse=self.settings['REVERSE_CATEGORY_ORDER'])
|
||||
|
||||
self.authors = list(self.authors.items())
|
||||
self.authors.sort(key=lambda item: item[0].name)
|
||||
self.authors.sort()
|
||||
|
||||
self._update_context(('articles', 'dates', 'tags', 'categories',
|
||||
'tag_cloud', 'authors', 'related_posts'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue