X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1705e6246ece4d75541f7feb42abef512ba3a3be..313e85700bb89857b89ff2538fb448185eeabcaf:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index d63b02dff..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, @@ -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; }#}}}