X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/523650d9c2b876152aaa9bc6c5d6363377ea7008..2eb990b3f5496d271adb5b42ad393dc810700ba5:/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