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/21 18:41:00 UTC

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

Author: joes
Date: Fri Mar 21 17:40:59 2014
New Revision: 1579991

URL: http://svn.apache.org/r1579991
Log:
sitemap nesting support

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=1579991&r1=1579990&r2=1579991&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Fri Mar 21 17:40:59 2014
@@ -12,6 +12,7 @@ our @patterns = (
         conf       => $conf,
         headers    => { title => "Sitemap" },
         preprocess => 1,
+        nest       => 1,
     }],
     [qr!/index\.html$!,    sitemap => {
         conf       => $conf,
@@ -34,12 +35,12 @@ my $cwd = cwd;
 find({ wanted => sub {
            $File::Find::prune = 1, return if -d and m!\.page$!;
            s!^\Q$cwd/content!!;
-           if (/\.md(?:text)?$/) {
+           if (/\.md(?:text)?$/ or m!/index\.html$!) {
                # basically grep s/^content//, glob "content/**/*.{md,mdtext}"
                # if perl's glob was as smart as zsh's glob
                push @{$dependencies{"/sitemap.html"}}, $_;
            }
-           if (s!/index.html$!!) {
+           if (s!/index\.html$!!) {
                $dependencies{"$_/index.html"} = [
                    grep s/^content//, glob("content$_/*.{md,mdtext}"),
                                       glob("content$_/*/index.html")