X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/998f47ed137959d0a0951368d8d0f891673c3ce5..d3ad47829871a52c622fcb918251f72f11fec0a5:/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; }