X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/998f47ed137959d0a0951368d8d0f891673c3ce5..61f4dbb8bec4c39a4c48aa67493e34205a3f3b06:/IkiWiki/Plugin/google.pm?ds=sidebyside 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; }