X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/9bae90024229618c1bfd320f1513d1054af89e5a..3c8f07b53f432cef8efce7239d2dbc7f21c75e29:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 499ec8834..1a00f2dbd 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -13,6 +13,7 @@ use vars qw{%config %links %oldlinks %oldpagemtime %pagectime %pagecase 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; @@ -24,7 +25,7 @@ memoize("pagespec_translate"); 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, @@ -320,7 +321,7 @@ sub baseurl (;$) { #{{{ sub abs2rel ($$) { #{{{ # Work around very innefficient behavior in File::Spec if abs2rel # is passed two relative paths. It's much faster if paths are - # absolute! + # absolute! (Debian bug #376658) my $path="/".shift; my $base="/".shift; @@ -590,7 +591,7 @@ sub template ($;@) { #{{{ HTML::Template->new(template_params(@_)); } #}}} -sub misctemplate ($$) { #{{{ +sub misctemplate ($$;@) { #{{{ my $title=shift; my $pagebody=shift; @@ -600,8 +601,12 @@ sub misctemplate ($$) { #{{{ indexlink => indexlink(), wikiname => $config{wikiname}, pagebody => $pagebody, - baseurl => baseurl(), + baseurl => baseurl(), + @_, ); + run_hooks(pagetemplate => sub { + shift->(page => "", destpage => "", template => $template); + }); return $template->output; }#}}}