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/24 20:45:56 UTC

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

Author: joes
Date: Mon Mar 24 19:45:55 2014
New Revision: 1581021

URL: http://svn.apache.org/r1581021
Log:
better

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=1581021&r1=1581020&r2=1581021&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Mon Mar 24 19:45:55 2014
@@ -9,6 +9,11 @@ my %thrift_args = (
     preprocess => 1,                     # generally enable template preprocessing of .md files
     repo       => 'thrift.git',          # set snippet default git repo
     template   => 'default.html',        # set common template argument (mainly for .md files)
+    snippet_footer =>
+        q(<p>This snippet was generated by {{ conf.title }}'s
+             <strong>source tree docs</strong>:
+             <a href="{{ snippet$1.uri }}"</a>{{ snippet$1.path }}</a>
+           </p>),
 );
 
 # order matters here: see http://www.apache.org/dev/cmsref#core-logic
@@ -30,6 +35,11 @@ our @patterns = (
     [qr!^/test/!,              snippet => { %thrift_args,
         view       => [qw/append_snippet_footer reconstruct
                           trim_local_link_extensions single_narrative/],
+        snippet_footer =>
+            q(<p>This page was generated by {{ conf.title }}'s
+                 <strong>source tree docs</strong>:
+                 <a href="{{ snippet$1.uri }}"</a>{{ snippet$1.path }}</a>
+               </p>),
     }],
     [qr/\.md(?:text)?$/,       snippet => { %thrift_args,
         view       => [qw/append_snippet_footer single_narrative/],

Modified: thrift/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1581021&r1=1581020&r2=1581021&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Mon Mar 24 19:45:55 2014
@@ -3,15 +3,4 @@ package view;
 # see https://svn.apache.org/repos/infra/websites/cms/build/lib/ASF/View.pm
 use base 'ASF::View';
 
-sub append_snippet_footer {
-    my %args = @_;
-    $args{view} = [@{$args{view}}] if ref $args{view};
-    my $view = ref $args{view} ? shift @{$args{view}} : delete $args{view};
-    $args{content} =~ s/({{ snippet([A-Z])\.fetch\|\w+ }}.*\n)/$1
-<p class="snippet_footer">This page was generated from {{ conf.title }}'s
-<strong>source tree docs<\/strong>: <a href="{{ snippet$2.uri }}">{{ snippet$2.path }}<\/a><\/p>
-/g;
-    return view->can($view)->(%args);
-}
-
 1;