You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jo...@apache.org on 2014/03/23 19:59:33 UTC

svn commit: r1580567 - /thrift/cms-site/trunk/lib/path.pm

Author: joes
Date: Sun Mar 23 18:59:32 2014
New Revision: 1580567

URL: http://svn.apache.org/r1580567
Log:
tweaks

Modified:
    thrift/cms-site/trunk/lib/path.pm

Modified: thrift/cms-site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1580567&r1=1580566&r2=1580567&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Sun Mar 23 18:59:32 2014
@@ -4,39 +4,32 @@ use ASF::Util qw/walk_content_tree Load/
 use strict;
 use warnings;
 
-my $conf = Load join "", <DATA>;
+my %thrift_args = (
+    conf       => Load join "", <DATA>,
+    preprocess => 1,
+    repo       => 'thrift.git',
+    template   => 'default.html',
+);
+
 
 our @patterns = (
-    [qr!^/sitemap\.html$!, offline => {
+    [qr!^/sitemap\.html$!,     offline => { %thrift_args,
         view       => 'sitemap',
-        conf       => $conf,
         headers    => { title => "Sitemap" },
-        nest       => 1,
-        preprocess => 1,
     }],
-    [qr!^/index\.html$!,   snippet => {
+    [qr!^/index\.html$!,       snippet => { %thrift_args,
         view       => 'news_page',
-        conf       => $conf,
         headers    => { title => "Home" },
-        repo       => 'thrift.git',
     }],
-    [qr!/index\.html$!,    offline => {
+    [qr!/index\.html$!,        offline => { %thrift_args,
         view       => 'sitemap',
-        conf       => $conf,
-        headers    => { title => "Index" }, # "Index" is magical here
-        preprocess => 1,
+        headers    => { title => "Index" }, # "Index" is magical with the sitemap view
     }],
-    [qr!/README.md(?:text)?$!, snippet => {
+    [qr!/README.md(?:text)?$!, snippet => { %thrift_args,
         view       => [qw/reconstruct single_narrative/],
-        conf       => $conf,
-        template   => 'default.html',
-        repo       => 'thrift.git',
     }],
-    [qr/\.md(?:text)?$/,   snippet => {
+    [qr/\.md(?:text)?$/,       snippet => { %thrift_args,
         view       => 'single_narrative',
-        conf       => $conf,
-        template   => 'default.html',
-        repo       => 'thrift.git',
     }],
 );