my $estdir="$config{wikistatedir}/hyperestraier";
my $cgi=IkiWiki::basename($config{cgiurl});
$cgi=~s/\..*$//;
- open(TEMPLATE, ">$estdir/$cgi.tmpl") ||
+ open(TEMPLATE, ">:utf8", "$estdir/$cgi.tmpl") ||
error("write $estdir/$cgi.tmpl: $!");
print TEMPLATE IkiWiki::misctemplate("search",
- "<!--ESTFORM-->\n\n<!--ESTRESULT-->\n\n<!--ESTINFO-->\n\n");
+ "<!--ESTFORM-->\n\n<!--ESTRESULT-->\n\n<!--ESTINFO-->\n\n",
+ baseurl => IkiWiki::dirname($config{cgiurl})."/");
close TEMPLATE;
open(TEMPLATE, ">$estdir/$cgi.conf") ||
error("write $estdir/$cgi.conf: $!");
$template->param(
index => $estdir,
tmplfile => "$estdir/$cgi.tmpl",
- destdir => IkiWiki::abs_path($config{destdir}),
+ destdir => abs_path($config{destdir}),
url => $config{url},
);
print TEMPLATE $template->output;