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 04:41:31 UTC

svn commit: r1580726 - in /thrift/cms-site/trunk: content/test/ThriftTest.thrift content/test/index.md lib/path.pm lib/view.pm

Author: joes
Date: Mon Mar 24 03:41:30 2014
New Revision: 1580726

URL: http://svn.apache.org/r1580726
Log:
title

Modified:
    thrift/cms-site/trunk/content/test/ThriftTest.thrift
    thrift/cms-site/trunk/content/test/index.md
    thrift/cms-site/trunk/lib/path.pm
    thrift/cms-site/trunk/lib/view.pm

Modified: thrift/cms-site/trunk/content/test/ThriftTest.thrift
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/test/ThriftTest.thrift?rev=1580726&r1=1580725&r2=1580726&view=diff
==============================================================================
--- thrift/cms-site/trunk/content/test/ThriftTest.thrift (original)
+++ thrift/cms-site/trunk/content/test/ThriftTest.thrift Mon Mar 24 03:41:30 2014
@@ -1,7 +1,3 @@
 Title: ThriftTest
 
 [snippet:path=test/ThriftTest.thrift:lang=text]
-
-This page was generated from Apache Thrift's **source tree docs**:
-[{{ snippetA.path }}]({{ snippetA.uri }})
-

Modified: thrift/cms-site/trunk/content/test/index.md
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/test/index.md?rev=1580726&r1=1580725&r2=1580726&view=diff
==============================================================================
--- thrift/cms-site/trunk/content/test/index.md (original)
+++ thrift/cms-site/trunk/content/test/index.md Mon Mar 24 03:41:30 2014
@@ -1,24 +1,5 @@
 Title: Test Readme
-Notice:    Licensed to the Apache Software Foundation (ASF) under one
-           or more contributor license agreements.  See the NOTICE file
-           distributed with this work for additional information
-           regarding copyright ownership.  The ASF licenses this file
-           to you under the Apache License, Version 2.0 (the
-           "License"); you may not use this file except in compliance
-           with the License.  You may obtain a copy of the License at
-           .
-             http://www.apache.org/licenses/LICENSE-2.0
-           .
-           Unless required by applicable law or agreed to in writing,
-           software distributed under the License is distributed on an
-           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-           KIND, either express or implied.  See the License for the
-           specific language governing permissions and limitations
-           under the License.
 
 [snippet:path=test/README.md]
 
-This page was generated from Apache Thrift's **source tree docs**:
-[{{ snippetA.path }}]({{ snippetA.uri }})
-
 

Modified: thrift/cms-site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1580726&r1=1580725&r2=1580726&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Mon Mar 24 03:41:30 2014
@@ -27,8 +27,8 @@ our @patterns = (
         view       => 'sitemap',
         headers    => { title => "Index" }, # "Index" is magical with the sitemap view
     }],
-    [qr!^/test/!, snippet => { %thrift_args,
-        view       => [qw/reconstruct trim_local_link_extensions single_narrative/],
+    [qr!^/test/!,              snippet => { %thrift_args,
+        view       => [qw/append_snippet_footer reconstruct trim_local_link_extensions single_narrative/],
     }],
     [qr/\.md(?:text)?$/,       snippet => { %thrift_args,
         view       => 'single_narrative',

Modified: thrift/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1580726&r1=1580725&r2=1580726&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Mon Mar 24 03:41:30 2014
@@ -3,6 +3,20 @@ 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} .= <<EOT;
+
+This page was generated from Apache Thrift's **source tree docs**:
+[{{ snippetA.path }}]({{ snippetA.uri }})
+EOT
+
+    return view->can($view)->(%args);
+}
+
 sub trim_local_link_extensions {
     my %args = @_;
     $args{view} = [@{$args{view}}] if ref $args{view};