aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/google.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/google.pm')
-rw-r--r--IkiWiki/Plugin/google.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm
index 68cb16513..529a2c801 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("", "googleform.tmpl");
}
my $form;
@@ -36,7 +40,7 @@ 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});
$form=$searchform->output;
}