}
} #}}}
+my $form;
sub pagetemplate (@) { #{{{
my %params=@_;
my $page=$params{page};
# Add search box to page header.
if ($template->query(name => "searchform")) {
- $template->param(searchform => qq{
-<form method="get" action="$IkiWiki::config{cgiurl}" id="searchform">
-<div>
-<input type="text" name="phrase" value="" size="16" />
-<input type="hidden" name="enc" value="UTF-8" />
-<input type="hidden" name="do" value="hyperestraier" />
-</div>
-</form>
-});
+ if (! defined $form) {
+ my $searchform = IkiWiki::template("searchform.tmpl", blind_cache => 1);
+ $searchform->param(searchaction => $IkiWiki::config{cgiurl});
+ $form=$searchform->output;
+ }
+
+ $template->param(searchform => $form);
}
} #}}}
IkiWiki::debug("updating hyperestraier search index");
IkiWiki::estcmd("gather -cm -bc -cl -sd",
map {
- $IkiWiki::config{destdir}."/".$IkiWiki::renderedfiles{IkiWiki::pagename($_)}
+ Encode::encode_utf8($IkiWiki::config{destdir}."/".$IkiWiki::renderedfiles{IkiWiki::pagename($_)})
} @_
);
IkiWiki::estcfg();