X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/0f67e7d96953535e98d9ec26c30a25b8aaad782c..338f0fde60d396cd20d697282313fff13b12f4eb:/IkiWiki/Plugin/inline.pm
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index a6bb5d58f..8efef3fc8 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -263,8 +263,14 @@ sub preprocess_inline (@) { #{{{
# Add a blog post form, with feed buttons.
my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
$formtemplate->param(cgiurl => $config{cgiurl});
- $formtemplate->param(rootpage =>
- exists $params{rootpage} ? $params{rootpage} : $params{page});
+ my $rootpage;
+ if (exists $params{rootpage}) {
+ $rootpage=bestlink($params{page}, $params{rootpage});
+ }
+ else {
+ $rootpage=$params{page};
+ }
+ $formtemplate->param(rootpage => $rootpage);
$formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
$formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
if (exists $params{postformtext}) {
@@ -364,7 +370,7 @@ sub preprocess_inline (@) { #{{{
if (! $params{preview}) {
writefile($rssp, $config{destdir},
genfeed("rss",
- $config{url}."/".rsspage($params{destpage}).$feednum, $desc, $params{guid}, $params{destpage}, @feedlist));
+ $config{url}."/".$rssp, $desc, $params{guid}, $params{destpage}, @feedlist));
$toping{$params{destpage}}=1 unless $config{rebuild};
$feedlinks{$params{destpage}}=qq{};
}
@@ -374,7 +380,7 @@ sub preprocess_inline (@) { #{{{
will_render($params{destpage}, $atomp);
if (! $params{preview}) {
writefile($atomp, $config{destdir},
- genfeed("atom", $config{url}."/".atompage($params{destpage}).$feednum, $desc, $params{guid}, $params{destpage}, @feedlist));
+ genfeed("atom", $config{url}."/".$atomp, $desc, $params{guid}, $params{destpage}, @feedlist));
$toping{$params{destpage}}=1 unless $config{rebuild};
$feedlinks{$params{destpage}}=qq{};
}