]> sipb.mit.edu Git - ikiwiki.git/commitdiff
inline: Fix urls to feed when feedfile is used on an index page.
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 19 Mar 2009 20:01:23 +0000 (16:01 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 19 Mar 2009 20:01:30 +0000 (16:01 -0400)
It would be better to use urlto() here, but will_render
has not yet been called on the feed files at this point, so
it won't work. (And reorganizing so it can be is tricky.)

IkiWiki/Plugin/inline.pm
debian/changelog
doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn

index 218fd7515f6a15b866f2e0424f1fc5d2723a6a6f..9d7d4b0fd832d32aa7c00ece7ede97ca1847508f 100644 (file)
@@ -281,8 +281,8 @@ sub preprocess_inline (@) {
                }
        }
 
-       my $rssurl=basename($feedbase."rss".$feednum) if $feeds && $rss;
-       my $atomurl=basename($feedbase."atom".$feednum) if $feeds && $atom;
+       my $rssurl=abs2rel($feedbase."rss".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $rss;
+       my $atomurl=abs2rel($feedbase."atom".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $atom;
 
        my $ret="";
 
index 8266afa0968e13cc09a399c6286dfa314a0393fb..06707a83c0b3ef3ab3a86c43db06ba87d77a0246 100644 (file)
@@ -2,6 +2,7 @@ ikiwiki (3.09) UNRELEASED; urgency=low
 
   * inline: Add title_natural sort order, using Sort::Naturally
     (chrysn)
+  * inline: Fix urls to feed when feedfile is used on an index page.
 
  -- Joey Hess <joeyh@debian.org>  Thu, 19 Mar 2009 15:32:49 -0400
 
index 1653e0b02524413ee0b5dd9a4758221161663a21..6b8781a8c49d60b4d2fa484f67cc4f1c858f764e 100644 (file)
@@ -3,3 +3,5 @@
 When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss.  However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory).
 
 `\[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]]`
+
+[[done]] --[[Joey]]