forked from github/pelican
Order the categories before outputing them.
This commit is contained in:
parent
08a6a62f4e
commit
62238a0078
2 changed files with 7 additions and 7 deletions
|
|
@ -105,6 +105,12 @@ def generate_blog(path=None, theme=None, output_path=None, markup=None,
|
|||
if 'BLOGURL' not in context:
|
||||
context['BLOGURL'] = output_path
|
||||
|
||||
generate_feed(articles, context, output_path, context['FEED'])
|
||||
for cat, arts in categories.items():
|
||||
arts.sort(key=attrgetter('date'), reverse=True)
|
||||
generate_feed(arts, context, output_path,
|
||||
context['CATEGORY_FEED'] % cat)
|
||||
|
||||
# generate the output
|
||||
generate = partial(generate_file, output_path)
|
||||
for template in _DIRECT_TEMPLATES:
|
||||
|
|
@ -118,12 +124,6 @@ def generate_blog(path=None, theme=None, output_path=None, markup=None,
|
|||
generate('%s' % article.url,
|
||||
templates['article'], context, article=article)
|
||||
|
||||
generate_feed(articles, context, output_path, context['FEED'])
|
||||
for category, articles in categories.items():
|
||||
articles.sort(key=attrgetter('date'), reverse=True)
|
||||
generate_feed(articles, context, output_path,
|
||||
context['CATEGORY_FEED'] % category)
|
||||
|
||||
# copy static paths to output
|
||||
for path in context['STATIC_PATHS']:
|
||||
try:
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -7,7 +7,7 @@ if sys.version_info < (2,7):
|
|||
|
||||
setup(
|
||||
name = "pelican",
|
||||
version = '1.2.3',
|
||||
version = '1.2.4',
|
||||
url = 'http://hg.lolnet.org/pelican/',
|
||||
author = 'Alexis Metaireau',
|
||||
author_email = 'alexis@notmyidea.org',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue