From fe91caf32532a03ee7669ca2725544ca9480ea79 Mon Sep 17 00:00:00 2001 From: tBunnyMan Date: Wed, 18 Jul 2012 11:18:48 -0700 Subject: [PATCH] Changed wording of the setting to NEWEST_FIRST_ARCHIVES Also updated documentation and tested to make sure behavior matches expected wording --- docs/fr/configuration.rst | 2 +- docs/settings.rst | 4 ++-- pelican/generators.py | 2 +- pelican/settings.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/fr/configuration.rst b/docs/fr/configuration.rst index 895802d6..c144a014 100644 --- a/docs/fr/configuration.rst +++ b/docs/fr/configuration.rst @@ -111,7 +111,7 @@ LINKS : PDF_PROCESSOR : Génère ou non les articles et pages au format pdf ; -REVERSE_ARCHIVE_ORDER : +NEWEST_FIRST_ARCHIVES : Met les articles plus récent en tête de l'archive ; SOCIAL : diff --git a/docs/settings.rst b/docs/settings.rst index 54d95b9d..b5bae7ab 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -364,8 +364,8 @@ Ordering content ================================================ ===================================================== Setting name (default value) What does it do? ================================================ ===================================================== -`REVERSE_ARCHIVE_ORDER` (``True``) Reverse the archives list order. (True: orders by date - in descending order, with newer articles first.) +`NEWEST_FIRST_ARCHIVES` (``True``) Order archives by newest first by date. (False: + orders by date with older articles first.) `REVERSE_CATEGORY_ORDER` (``False``) Reverse the category order. (True: lists by reverse alphabetical order; default lists alphabetically.) ================================================ ===================================================== diff --git a/pelican/generators.py b/pelican/generators.py index 14616949..b42c9a03 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -308,7 +308,7 @@ class ArticlesGenerator(Generator): self.articles.sort(key=attrgetter('date'), reverse=True) self.dates = list(self.articles) self.dates.sort(key=attrgetter('date'), - reverse=self.context['REVERSE_ARCHIVE_ORDER']) + reverse=self.context['NEWEST_FIRST_ARCHIVES']) # create tag cloud tag_cloud = defaultdict(int) diff --git a/pelican/settings.py b/pelican/settings.py index dbecfd47..86f08d92 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -32,7 +32,7 @@ _DEFAULT_CONFIG = {'PATH': '.', 'DEFAULT_DATE': 'fs', 'WITH_FUTURE_DATES': True, 'CSS_FILE': 'main.css', - 'REVERSE_ARCHIVE_ORDER': True, + 'NEWEST_FIRST_ARCHIVES': True, 'REVERSE_CATEGORY_ORDER': False, 'DELETE_OUTPUT_DIRECTORY': False, 'ARTICLE_URL': '{slug}.html',