From ee94407891dd648a46be56c2cc62b21cca690de9 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kodama.kitenet.net>
Date: Sun, 14 Sep 2008 13:50:34 -0400
Subject: [PATCH] rootpage is not a pagespec

So ./posts won't be interpreted right. Just "posts" should do, I think.
---
 IkiWiki/Plugin/inline.pm     | 10 ++++++++--
 doc/examples/blog/index.mdwn |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 02c9cbdc0..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}) {
diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn
index 3b2d46027..6daf9db50 100644
--- a/doc/examples/blog/index.mdwn
+++ b/doc/examples/blog/index.mdwn
@@ -7,7 +7,7 @@ browse the tag cloud on the right. An archive of all [[posts]] is also
 available.
 
 [[!inline pages="./posts/* and !*/Discussion" show="10"
-actions=yes rootpage="./posts"]]
+actions=yes rootpage="posts"]]
 
 ----
 
-- 
2.39.5