X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/abd233931247ef38f1b084afd5906619f02c13b6..1d46ebef52412b3b93e547ce124d813cf34e3b56:/IkiWiki/Plugin/google.pm diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 68cb16513..68cde261c 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -25,6 +25,10 @@ sub checkconfig () { if (! length $config{url}) { error(sprintf(gettext("Must specify %s when using the %s plugin"), "url", 'google')); } + + # This is a mass dependency, so if the search form template + # changes, every page is rebuilt. + add_depends("", "templates/googleform.tmpl"); } my $form; @@ -36,8 +40,9 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template_depends("googleform.tmpl", $page, blind_cache => 1); + my $searchform = template("googleform.tmpl", blind_cache => 1); $searchform->param(url => $config{url}); + $searchform->param(html5 => $config{html5}); $form=$searchform->output; }