Author: joes
Date: Wed Mar 19 20:59:44 2014
New Revision: 1579395
URL: http://svn.apache.org/r1579395
Log:
cleaner
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=1579395&r1=1579394&r2=1579395&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Wed Mar 19 20:59:44 2014
@@ -20,26 +20,22 @@ our @patterns = (
our $runners = 1; # maximize page memoization impact
-my @mdfiles; # basically grep s/^content//, glob "content/**/*.{md,mdtext}"
- # if perl's glob was as smart as zsh's glob
-
-our %dependencies = (
- "/docs.md" => [ grep s/^content//, glob("content/docs/*.{md,mdtext}"),
- glob "content/docs/*/index.{md,mdtext}"
],
- "/sitemap.html" => \@mdfiles,
-);
+our %dependencies;
my $cwd = cwd;
find({ wanted => sub {
$File::Find::prune = 1, return if -d and m!\.page$!;
s!^\Q$cwd/content!!;
if (/\.md(?:text)?$/) {
- push @mdfiles, $_;
+ # 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$!!) {
$dependencies{"$_/index.html"} = [
grep s/^content//, glob("content$_/*.{md,mdtext}"),
- glob("content$_/*/index.html") ],
+ glob("content$_/*/index.html")
+ ];
}
}, no_chdir => 1 }, "$cwd/content");