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/19 23:04:20 UTC

svn commit: r1579422 - in /thrift/cms-site/trunk/lib: path.pm view.pm

Author: joes
Date: Wed Mar 19 22:04:20 2014
New Revision: 1579422

URL: http://svn.apache.org/r1579422
Log:
enable template preprocessing manually

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

Modified: thrift/cms-site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1579422&r1=1579421&r2=1579422&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Wed Mar 19 22:04:20 2014
@@ -8,13 +8,22 @@ use warnings;
 my $conf = Load(join "", <DATA>);
 
 our @patterns = (
-    [qr!^/sitemap\.html$!, sitemap => { conf => $conf, headers => { title => "Sitemap" } }],
-    [qr!/index\.html$!,    sitemap => { conf => $conf, headers => { title => "Index" } }],
+    [qr!^/sitemap\.html$!, sitemap => {
+        conf       => $conf,
+        headers    => { title => "Sitemap" },
+        preprocess => 1,
+    }],
+    [qr!/index\.html$!,    sitemap => {
+        conf       => $conf,
+        headers    => { title => "Index" },
+        preprocess => 1,
+    }],
     [qr/\.md(?:text)?$/, thrift_preprocessor => {
-        view     => 'single_narrative',
-        conf     => $conf,
-        template => 'default.html',
-        memo     => {}, # maintain a page generation cache
+        view       => 'single_narrative',
+        conf       => $conf,
+        template   => 'default.html',
+        memo       => {}, # maintain a page generation cache
+        preprocess => 1,
     }],
 );
 

Modified: thrift/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1579422&r1=1579421&r2=1579422&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Wed Mar 19 22:04:20 2014
@@ -23,7 +23,7 @@ sub thrift_preprocessor {
                            "{{ " . $key++ . ".list.$a{index} }}";
                        }ge;
 
-    my @rv = view->can($args{view})->(preprocess => 1, %args);
+    my @rv = view->can($args{view})->(%args);
     $args{memo}->{$file} = \@rv if exists $args{memo};
     return @rv;
 }