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/25 04:26:50 UTC

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

Author: joes
Date: Tue Mar 25 03:26:49 2014
New Revision: 1581206

URL: http://svn.apache.org/r1581206
Log:
reflow

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=1581206&r1=1581205&r2=1581206&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Tue Mar 25 03:26:49 2014
@@ -4,18 +4,23 @@ use ASF::Util qw/walk_content_tree Load/
 use strict;
 use warnings;
 
+my $thrift_snippet_footer = <<'EOT';
+<p class='snippet_footer'>
+  This snippet was generated by {{ conf.title }}'s <strong>source tree docs</strong>:
+  <a href="{{ $snippet.pretty_uri }}"</a>{{ $snippet.path }}</a>
+</p>
+EOT
+
 my %thrift_args = (
     conf          => Load(join "", <DATA>), # make YAML __DATA__ below available in conf argument
     preprocess    => 1,                     # 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=>                        # append this string to each generated snipppet block
-        q(<p>This snippet was generated by {{ conf.title }}'s
-             <strong>source tree docs</strong>:
-             <a href="{{ $snippet.pretty_uri }}"</a>{{ $snippet.path }}</a>
-           </p>),
+    snippet_footer=> $thrift_snippet_footer,# append this string to each generated snipppet block
 );
 
+$thrift_snippet_footer =~ s/ snippet / page /; # full page 'snippets'
+
 # order matters here: see http://www.apache.org/dev/cmsref#core-logic
 
 our @patterns = (
@@ -34,13 +39,7 @@ our @patterns = (
     }],
     [qr!^/test/!,              snippet => { %thrift_args,
         view      => [qw/reconstruct trim_local_link_extensions single_narrative/],
-
-        snippet_footer =>                  # these are full pages not simply snippets
-            q(<p>This page was generated by {{ conf.title }}'s
-                 <strong>source tree docs</strong>:
-                 <a href="{{ $snippet.pretty_uri }}"</a>{{ $snippet.path }}</a>
-              </p>),
-
+        snippet_footer => $thrift_snippet_footer, # these are full pages not simply snippets
     }],
     [qr/\.md(?:text)?$/,       snippet => { %thrift_args,
         view      => 'single_narrative',