X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/17b2afe721d5b8fd2468fca56e91fe83bf49be64..af26398c14fe9de4e884e03df7125642ac9cdd82:/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