Are you sure you need this? I mean, if you just drop the line that matches .html files from path.pm, the build system will by default copy any .html files it sees over to the site.
----- Original Message ---- > From: "[email protected]" <[email protected]> > To: [email protected] > Sent: Sat, May 28, 2011 5:02:46 PM > Subject: [lucy-commits] svn commit: r1128773 - in >/incubator/lucy/site/trunk/lib: path.pm view.pm > > Author: marvin > Date: Sat May 28 21:02:46 2011 > New Revision: 1128773 > > URL: http://svn.apache.org/viewvc?rev=1128773&view=rev > Log: > Make html pages pass through properly. > > Modified: > incubator/lucy/site/trunk/lib/path.pm > incubator/lucy/site/trunk/lib/view.pm > > Modified: incubator/lucy/site/trunk/lib/path.pm > URL: >http://svn.apache.org/viewvc/incubator/lucy/site/trunk/lib/path.pm?rev=1128773&r1=1128772&r2=1128773&view=diff > > ============================================================================== > --- incubator/lucy/site/trunk/lib/path.pm (original) > +++ incubator/lucy/site/trunk/lib/path.pm Sat May 28 21:02:46 2011 > @@ -9,7 +9,7 @@ use warnings; > # be passed to the view subroutine. > > our @patterns = ( > - [ qr!^/.*\.html$!, basic => {} ], > + [ qr!^/.*\.html$!, passthrough => { type => 'html' } ], > [ qr!\.mdtext$!, basic => { template => "basic.html" } ], > ); > > > Modified: incubator/lucy/site/trunk/lib/view.pm > URL: >http://svn.apache.org/viewvc/incubator/lucy/site/trunk/lib/view.pm?rev=1128773&r1=1128772&r2=1128773&view=diff > > ============================================================================== > --- incubator/lucy/site/trunk/lib/view.pm (original) > +++ incubator/lucy/site/trunk/lib/view.pm Sat May 28 21:02:46 2011 > @@ -51,6 +51,15 @@ sub basic { > return ($rendered, 'html', \%args); > } > > +# Relay the page as is. > +sub passthrough { > + my %args = @_; > + my $filepath = "content$args{path}"; > + open(my $fh, '<', $filepath) or die "Can't open $filepath: $!"; > + my $content = do { local $/; <$fh> }; > + return ($content, $args{type}, \%args); > +} > + > sub _breadcrumbs { > my $path = shift; > my @breadcrumbs = ( > > >
