use Exporter q{import};
our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
bestlink htmllink readfile writefile pagetype srcfile pagename
+ displaytime
%config %links %renderedfiles %pagesources);
our $VERSION = 1.00;
my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
sub defaultconfig () { #{{{
- wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$)},
+ wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$|.arch-ids/|{arch}/)},
wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]]+)\]\]/,
wiki_file_regexp => qr/(^[-[:alnum:]_.:\/+]+$)/,
verbose => 0,
HTML::Template->new(template_params(@_));
} #}}}
-sub misctemplate ($$) { #{{{
+sub misctemplate ($$;@) { #{{{
my $title=shift;
my $pagebody=shift;
indexlink => indexlink(),
wikiname => $config{wikiname},
pagebody => $pagebody,
- baseurl => baseurl(),
+ baseurl => baseurl(),
+ @_,
);
+ run_hooks(pagetemplate => sub {
+ shift->(page => "", destpage => "", template => $template);
+ });
return $template->output;
}#}}}