X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/17b2afe721d5b8fd2468fca56e91fe83bf49be64..bb2697ca5e39bc40a18aa01582087cc5c558442e:/IkiWiki/Plugin/template.pm diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index 57bff20ff..b6097bb49 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -10,7 +10,8 @@ use Encode; sub import { hook(type => "getsetup", id => "template", call => \&getsetup); - hook(type => "preprocess", id => "template", call => \&preprocess); + hook(type => "preprocess", id => "template", call => \&preprocess, + scan => 1); } sub getsetup () { @@ -68,9 +69,13 @@ sub preprocess (@) { } } + # This needs to run even in scan mode, in order to process + # links and other metadata includes via the template. + my $scan=! defined wantarray; + return IkiWiki::preprocess($params{page}, $params{destpage}, IkiWiki::filter($params{page}, $params{destpage}, - $template->output)); + $template->output), $scan); } 1