aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/Feeds_link_to_index.html_instead_of_directory.mdwn
blob: b7efa6a37590969f5c1b065b2a4de6f2f5ff9f4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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.

Thanks, that had been annoying me too. [[done]] --[[Joey]]

Patch:

<pre>
Index: IkiWiki/Plugin/inline.pm
===================================================================
--- IkiWiki/Plugin/inline.pm    (revision 3241)
+++ IkiWiki/Plugin/inline.pm    (working copy)
@@ -312,13 +312,13 @@
        my $page=shift;
        my @pages=@_;
 
-       my $url=URI->new(encode_utf8($config{url}."/".htmlpage($page)));
+       my $url=URI->new(encode_utf8($config{url}."/".urlto($page, "")));
 
        my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1);
        my $content="";
        my $lasttime = 0;
        foreach my $p (@pages) {
-               my $u=URI->new(encode_utf8($config{url}."/".htmlpage($p)));
+               my $u=URI->new(encode_utf8($config{url}."/".urlto($p, "")));
 
                my $pcontent = absolute_urls(get_inline_content($p, $page), $url);

@@ -415,7 +415,7 @@
 
        foreach my $page (keys %toping) {
                my $title=pagetitle(basename($page), 0);
-               my $url="$config{url}/".htmlpage($page);
+               my $url="$config{url}/".urlto($page, "");
                foreach my $pingurl (@{$config{pingurl}}) {
                        debug("Pinging $pingurl for $page");
                        eval {
</pre>