Repository: getpelican/pelican

Issue:
make REVERSE_ARCHIVE_ORDER=True default
This is a more common scenario than listing the oldest post on top.



Discussion:
this is related to #308

is it still the case with the latest master?

there was a major error in the title - fixed

Oh, then I have to disagree. I tihnk that listing the archives in order is the right thing to do. that's customizable though.

It's far more common and expected to see Archives (and blog posts) listing newer entries first. What's your experience?

Oh, after double checking, seems that you're effectively right :)

thanks for reconsidering


Resolving patch:
diff --git a/pelican/generators.py b/pelican/generators.py
--- a/pelican/generators.py
+++ b/pelican/generators.py
@@ -308,7 +308,7 @@ def generate_context(self):
         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
--- a/pelican/settings.py
+++ b/pelican/settings.py
@@ -32,7 +32,7 @@
                    'DEFAULT_DATE': 'fs',
                    'WITH_FUTURE_DATES': True,
                    'CSS_FILE': 'main.css',
-                   'REVERSE_ARCHIVE_ORDER': False,
+                   'NEWEST_FIRST_ARCHIVES': True,
                    'REVERSE_CATEGORY_ORDER': False,
                    'DELETE_OUTPUT_DIRECTORY': False,
                    'ARTICLE_URL': '{slug}.html',


Test patch:
diff --git a/tests/output/basic/archives.html b/tests/output/basic/archives.html
--- a/tests/output/basic/archives.html
+++ b/tests/output/basic/archives.html
@@ -47,14 +47,11 @@ <h1>Archives for A Pelican Blog</h1>
 
 <dl>
 
-    <dt>Fri 15 October 2010</dt>
-    <dd><a href="./unbelievable.html">Unbelievable !</a></dd>
-
-    <dt>Wed 20 October 2010</dt>
-    <dd><a href="./oh-yeah.html">Oh yeah !</a></dd>
+    <dt>Wed 29 February 2012</dt>
+    <dd><a href="./second-article.html">Second article</a></dd>
 
-    <dt>Thu 02 December 2010</dt>
-    <dd><a href="./this-is-a-super-article.html">This is a super article !</a></dd>
+    <dt>Wed 20 April 2011</dt>
+    <dd><a href="./a-markdown-powered-article.html">A markdown powered article</a></dd>
 
     <dt>Thu 17 February 2011</dt>
     <dd><a href="./article-1.html">Article 1</a></dd>
@@ -65,11 +62,14 @@ <h1>Archives for A Pelican Blog</h1>
     <dt>Thu 17 February 2011</dt>
     <dd><a href="./article-3.html">Article 3</a></dd>
 
-    <dt>Wed 20 April 2011</dt>
-    <dd><a href="./a-markdown-powered-article.html">A markdown powered article</a></dd>
+    <dt>Thu 02 December 2010</dt>
+    <dd><a href="./this-is-a-super-article.html">This is a super article !</a></dd>
 
-    <dt>Wed 29 February 2012</dt>
-    <dd><a href="./second-article.html">Second article</a></dd>
+    <dt>Wed 20 October 2010</dt>
+    <dd><a href="./oh-yeah.html">Oh yeah !</a></dd>
+
+    <dt>Fri 15 October 2010</dt>
+    <dd><a href="./unbelievable.html">Unbelievable !</a></dd>
 
 </dl>
 </section>
diff --git a/tests/output/basic/tag/bar.html b/tests/output/basic/tag/bar.html
--- a/tests/output/basic/tag/bar.html
+++ b/tests/output/basic/tag/bar.html
@@ -49,7 +49,7 @@ <h1><a href="../.">A Pelican Blog </a></h1>
         
             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href=".././second-article-fr.html">Deuxième article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
@@ -66,10 +66,10 @@ <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h
 
 Translations: 
     
-        <a href=".././second-article-fr.html">fr</a>
+        <a href=".././second-article.html">en</a>
     
 
-</footer><!-- /.post-info --><p>This is some article, in english</p>
+</footer><!-- /.post-info --><p>Ceci est un article, en français.</p>
 
                 </article>
                 
@@ -90,8 +90,8 @@ <h1>Other articles</h1>
             
             <li><article class="hentry">    
                 <header>
-                    <h1><a href=".././second-article-fr.html" rel="bookmark"
-                           title="Permalink to Deuxième article">Deuxième article</a></h1>
+                    <h1><a href=".././second-article.html" rel="bookmark"
+                           title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
                 <div class="entry-content">
@@ -111,13 +111,13 @@ <h1><a href=".././second-article-fr.html" rel="bookmark"
 
 Translations: 
     
-        <a href=".././second-article.html">en</a>
+        <a href=".././second-article-fr.html">fr</a>
     
 
 </footer><!-- /.post-info -->
-                <p>Ceci est un article, en français.</p>
+                <p>This is some article, in english</p>
 
-                <a class="readmore" href=".././second-article-fr.html">read more</a>
+                <a class="readmore" href=".././second-article.html">read more</a>
                 
                 </div><!-- /.entry-content -->
             </article></li>
diff --git a/tests/output/basic/tag/baz.html b/tests/output/basic/tag/baz.html
--- a/tests/output/basic/tag/baz.html
+++ b/tests/output/basic/tag/baz.html
@@ -49,7 +49,7 @@ <h1><a href="../.">A Pelican Blog </a></h1>
         
             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href=".././second-article-fr.html">Deuxième article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
@@ -66,10 +66,10 @@ <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h
 
 Translations: 
     
-        <a href=".././second-article-fr.html">fr</a>
+        <a href=".././second-article.html">en</a>
     
 
-</footer><!-- /.post-info --><p>This is some article, in english</p>
+</footer><!-- /.post-info --><p>Ceci est un article, en français.</p>
 
                 </article>
                 
@@ -90,8 +90,8 @@ <h1>Other articles</h1>
             
             <li><article class="hentry">    
                 <header>
-                    <h1><a href=".././second-article-fr.html" rel="bookmark"
-                           title="Permalink to Deuxième article">Deuxième article</a></h1>
+                    <h1><a href=".././second-article.html" rel="bookmark"
+                           title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
                 <div class="entry-content">
@@ -111,13 +111,13 @@ <h1><a href=".././second-article-fr.html" rel="bookmark"
 
 Translations: 
     
-        <a href=".././second-article.html">en</a>
+        <a href=".././second-article-fr.html">fr</a>
     
 
 </footer><!-- /.post-info -->
-                <p>Ceci est un article, en français.</p>
+                <p>This is some article, in english</p>
 
-                <a class="readmore" href=".././second-article-fr.html">read more</a>
+                <a class="readmore" href=".././second-article.html">read more</a>
                 
                 </div><!-- /.entry-content -->
             </article></li>
diff --git a/tests/output/basic/tag/foo.html b/tests/output/basic/tag/foo.html
--- a/tests/output/basic/tag/foo.html
+++ b/tests/output/basic/tag/foo.html
@@ -49,7 +49,7 @@ <h1><a href="../.">A Pelican Blog </a></h1>
         
             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href=".././second-article-fr.html">Deuxième article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
@@ -66,10 +66,10 @@ <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h
 
 Translations: 
     
-        <a href=".././second-article-fr.html">fr</a>
+        <a href=".././second-article.html">en</a>
     
 
-</footer><!-- /.post-info --><p>This is some article, in english</p>
+</footer><!-- /.post-info --><p>Ceci est un article, en français.</p>
 
                 </article>
                 
@@ -90,8 +90,8 @@ <h1>Other articles</h1>
             
             <li><article class="hentry">    
                 <header>
-                    <h1><a href=".././second-article-fr.html" rel="bookmark"
-                           title="Permalink to Deuxième article">Deuxième article</a></h1>
+                    <h1><a href=".././second-article.html" rel="bookmark"
+                           title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
                 <div class="entry-content">
@@ -111,13 +111,13 @@ <h1><a href=".././second-article-fr.html" rel="bookmark"
 
 Translations: 
     
-        <a href=".././second-article.html">en</a>
+        <a href=".././second-article-fr.html">fr</a>
     
 
 </footer><!-- /.post-info -->
-                <p>Ceci est un article, en français.</p>
+                <p>This is some article, in english</p>
 
-                <a class="readmore" href=".././second-article-fr.html">read more</a>
+                <a class="readmore" href=".././second-article.html">read more</a>
                 
                 </div><!-- /.entry-content -->
             </article></li>
diff --git a/tests/output/custom/archives.html b/tests/output/custom/archives.html
--- a/tests/output/custom/archives.html
+++ b/tests/output/custom/archives.html
@@ -55,14 +55,11 @@ <h1>Archives for Alexis' log</h1>
 
 <dl>
 
-    <dt>Fri 15 October 2010</dt>
-    <dd><a href="./unbelievable.html">Unbelievable !</a></dd>
-
-    <dt>Wed 20 October 2010</dt>
-    <dd><a href="./oh-yeah.html">Oh yeah !</a></dd>
+    <dt>Wed 29 February 2012</dt>
+    <dd><a href="./second-article.html">Second article</a></dd>
 
-    <dt>Thu 02 December 2010</dt>
-    <dd><a href="./this-is-a-super-article.html">This is a super article !</a></dd>
+    <dt>Wed 20 April 2011</dt>
+    <dd><a href="./a-markdown-powered-article.html">A markdown powered article</a></dd>
 
     <dt>Thu 17 February 2011</dt>
     <dd><a href="./article-1.html">Article 1</a></dd>
@@ -73,11 +70,14 @@ <h1>Archives for Alexis' log</h1>
     <dt>Thu 17 February 2011</dt>
     <dd><a href="./article-3.html">Article 3</a></dd>
 
-    <dt>Wed 20 April 2011</dt>
-    <dd><a href="./a-markdown-powered-article.html">A markdown powered article</a></dd>
+    <dt>Thu 02 December 2010</dt>
+    <dd><a href="./this-is-a-super-article.html">This is a super article !</a></dd>
 
-    <dt>Wed 29 February 2012</dt>
-    <dd><a href="./second-article.html">Second article</a></dd>
+    <dt>Wed 20 October 2010</dt>
+    <dd><a href="./oh-yeah.html">Oh yeah !</a></dd>
+
+    <dt>Fri 15 October 2010</dt>
+    <dd><a href="./unbelievable.html">Unbelievable !</a></dd>
 
 </dl>
 </section>
diff --git a/tests/output/custom/tag/bar.html b/tests/output/custom/tag/bar.html
--- a/tests/output/custom/tag/bar.html
+++ b/tests/output/custom/tag/bar.html
@@ -57,7 +57,7 @@ <h1><a href="../.">Alexis' log </a></h1>
         
             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href=".././second-article-fr.html">Deuxième article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
@@ -74,11 +74,11 @@ <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h
 
 Translations: 
     
-        <a href=".././second-article-fr.html">fr</a>
+        <a href=".././second-article.html">en</a>
     
 
-</footer><!-- /.post-info --><p>This is some article, in english</p>
-<p>There are <a href=".././second-article.html#disqus_thread">comments</a>.</p>
+</footer><!-- /.post-info --><p>Ceci est un article, en français.</p>
+<p>There are <a href=".././second-article-fr.html#disqus_thread">comments</a>.</p>
                 </article>
                 
             </aside><!-- /#featured -->
@@ -98,8 +98,8 @@ <h1>Other articles</h1>
             
             <li><article class="hentry">    
                 <header>
-                    <h1><a href=".././second-article-fr.html" rel="bookmark"
-                           title="Permalink to Deuxième article">Deuxième article</a></h1>
+                    <h1><a href=".././second-article.html" rel="bookmark"
+                           title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
                 <div class="entry-content">
@@ -119,14 +119,14 @@ <h1><a href=".././second-article-fr.html" rel="bookmark"
 
 Translations: 
     
-        <a href=".././second-article.html">en</a>
+        <a href=".././second-article-fr.html">fr</a>
     
 
 </footer><!-- /.post-info -->
-                <p>Ceci est un article, en français.</p>
+                <p>This is some article, in english</p>
 
-                <a class="readmore" href=".././second-article-fr.html">read more</a>
-                <p>There are <a href=".././second-article-fr.html#disqus_thread">comments</a>.</p>
+                <a class="readmore" href=".././second-article.html">read more</a>
+                <p>There are <a href=".././second-article.html#disqus_thread">comments</a>.</p>
                 </div><!-- /.entry-content -->
             </article></li>
         
diff --git a/tests/output/custom/tag/baz.html b/tests/output/custom/tag/baz.html
--- a/tests/output/custom/tag/baz.html
+++ b/tests/output/custom/tag/baz.html
@@ -57,7 +57,7 @@ <h1><a href="../.">Alexis' log </a></h1>
         
             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href=".././second-article-fr.html">Deuxième article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
@@ -74,11 +74,11 @@ <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h
 
 Translations: 
     
-        <a href=".././second-article-fr.html">fr</a>
+        <a href=".././second-article.html">en</a>
     
 
-</footer><!-- /.post-info --><p>This is some article, in english</p>
-<p>There are <a href=".././second-article.html#disqus_thread">comments</a>.</p>
+</footer><!-- /.post-info --><p>Ceci est un article, en français.</p>
+<p>There are <a href=".././second-article-fr.html#disqus_thread">comments</a>.</p>
                 </article>
                 
             </aside><!-- /#featured -->
@@ -98,8 +98,8 @@ <h1>Other articles</h1>
             
             <li><article class="hentry">    
                 <header>
-                    <h1><a href=".././second-article-fr.html" rel="bookmark"
-                           title="Permalink to Deuxième article">Deuxième article</a></h1>
+                    <h1><a href=".././second-article.html" rel="bookmark"
+                           title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
                 <div class="entry-content">
@@ -119,14 +119,14 @@ <h1><a href=".././second-article-fr.html" rel="bookmark"
 
 Translations: 
     
-        <a href=".././second-article.html">en</a>
+        <a href=".././second-article-fr.html">fr</a>
     
 
 </footer><!-- /.post-info -->
-                <p>Ceci est un article, en français.</p>
+                <p>This is some article, in english</p>
 
-                <a class="readmore" href=".././second-article-fr.html">read more</a>
-                <p>There are <a href=".././second-article-fr.html#disqus_thread">comments</a>.</p>
+                <a class="readmore" href=".././second-article.html">read more</a>
+                <p>There are <a href=".././second-article.html#disqus_thread">comments</a>.</p>
                 </div><!-- /.entry-content -->
             </article></li>
         
diff --git a/tests/output/custom/tag/foo.html b/tests/output/custom/tag/foo.html
--- a/tests/output/custom/tag/foo.html
+++ b/tests/output/custom/tag/foo.html
@@ -57,7 +57,7 @@ <h1><a href="../.">Alexis' log </a></h1>
         
             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href=".././second-article-fr.html">Deuxième article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
@@ -74,11 +74,11 @@ <h1 class="entry-title"><a href=".././second-article.html">Second article</a></h
 
 Translations: 
     
-        <a href=".././second-article-fr.html">fr</a>
+        <a href=".././second-article.html">en</a>
     
 
-</footer><!-- /.post-info --><p>This is some article, in english</p>
-<p>There are <a href=".././second-article.html#disqus_thread">comments</a>.</p>
+</footer><!-- /.post-info --><p>Ceci est un article, en français.</p>
+<p>There are <a href=".././second-article-fr.html#disqus_thread">comments</a>.</p>
                 </article>
                 
             </aside><!-- /#featured -->
@@ -98,8 +98,8 @@ <h1>Other articles</h1>
             
             <li><article class="hentry">    
                 <header>
-                    <h1><a href=".././second-article-fr.html" rel="bookmark"
-                           title="Permalink to Deuxième article">Deuxième article</a></h1>
+                    <h1><a href=".././second-article.html" rel="bookmark"
+                           title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
                 <div class="entry-content">
@@ -119,14 +119,14 @@ <h1><a href=".././second-article-fr.html" rel="bookmark"
 
 Translations: 
     
-        <a href=".././second-article.html">en</a>
+        <a href=".././second-article-fr.html">fr</a>
     
 
 </footer><!-- /.post-info -->
-                <p>Ceci est un article, en français.</p>
+                <p>This is some article, in english</p>
 
-                <a class="readmore" href=".././second-article-fr.html">read more</a>
-                <p>There are <a href=".././second-article-fr.html#disqus_thread">comments</a>.</p>
+                <a class="readmore" href=".././second-article.html">read more</a>
+                <p>There are <a href=".././second-article.html#disqus_thread">comments</a>.</p>
                 </div><!-- /.entry-content -->
             </article></li>