X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/678d467a4080dd549f2b6f276f963eac384e1b4f..dd2fa2efb956f8af6c98d37f8cfd280df2f97cb5:/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