]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Feeds_link_to_index.html_instead_of_directory.mdwn
1ae3d5e6fb11a5cb827245b0f905541302b78b77
[ikiwiki.git] / doc / bugs / Feeds_link_to_index.html_instead_of_directory.mdwn
1 When --usedirs is used, RSS and Atom feeds seem to link to the index.html directly, both for the site and for the feed items, instead of the directory, as pages otherwise do.
2
3 Patch:
4
5 <pre>
6 Index: IkiWiki/Plugin/inline.pm
7 ===================================================================
8 --- IkiWiki/Plugin/inline.pm    (revision 3241)
9 +++ IkiWiki/Plugin/inline.pm    (working copy)
10 @@ -312,13 +312,13 @@
11         my $page=shift;
12         my @pages=@_;
13  
14 -       my $url=URI->new(encode_utf8($config{url}."/".htmlpage($page)));
15 +       my $url=URI->new(encode_utf8($config{url}."/".urlto($page, "")));
16  
17         my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1);
18         my $content="";
19         my $lasttime = 0;
20         foreach my $p (@pages) {
21 -               my $u=URI->new(encode_utf8($config{url}."/".htmlpage($p)));
22 +               my $u=URI->new(encode_utf8($config{url}."/".urlto($p, "")));
23  
24                 my $pcontent = absolute_urls(get_inline_content($p, $page), $url);
25
26 @@ -415,7 +415,7 @@
27  
28         foreach my $page (keys %toping) {
29                 my $title=pagetitle(basename($page), 0);
30 -               my $url="$config{url}/".htmlpage($page);
31 +               my $url="$config{url}/".urlto($page, "");
32                 foreach my $pingurl (@{$config{pingurl}}) {
33                         debug("Pinging $pingurl for $page");
34                         eval {
35 </pre>