really fix the baseurl problem

the issue is that HTML::Template doesn't expand top-level variables when inside
a loop
master
Joey Hess 2008-01-29 18:19:47 -05:00
parent 9e15bd27ea
commit f584abec0c
1 changed files with 2 additions and 1 deletions

View File

@ -60,6 +60,8 @@ sub store ($$$) { #{{{
else {
$_->{link} = IkiWiki::pagetitle($_->{page});
}
$_->{baseurl}="$config{url}/" if length $config{url};
$_;
} @{$change->{pages}}
];
@ -94,7 +96,6 @@ sub store ($$$) { #{{{
commitdate => displaytime($change->{when}, "%X %x"),
wikiname => $config{wikiname},
);
$template->param(baseurl => "$config{url}/") if length $config{url};
IkiWiki::run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page, template => $template);
});