fix comment permalink to always point to comment parent page
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 19 Dec 2008 22:33:40 +0000 (17:33 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 19 Dec 2008 22:33:40 +0000 (17:33 -0500)
IkiWiki/Plugin/comments.pm
doc/todo/comments.mdwn

index 50c048fee2d757aaf3cebe09c3a8a037e15a9c6f..c50729a34cfe431cbac062a57c63174991db4ec5 100644 (file)
@@ -194,7 +194,7 @@ sub preprocess {
        }
 
        if ($params{page} =~ m/\/(\Q$config{comments_pagename}\E\d+)$/) {
-               $pagestate{$page}{meta}{permalink} = urlto($params{destpage}, undef, 1).
+               $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page}), undef, 1).
                        "#".$params{page};
        }
 
index 81c2f2722a7914d972a20aaa7b7fbbeba97ce747..aa6b130dc737449782e08997b33318ea5f6c73df 100644 (file)
@@ -53,9 +53,7 @@ Known issues with the [[plugins/comments]] plugin:
   (BTW, the rss feed in this situation seems ok; there the link element
   points back to the parent page.
 
-  > done
-  > Er, no, I added a link but it does not go back to the parent page of a
-  > comment if the comment is inlined elsewhere. --[[Joey]] 
+  > done --[[Joey]] 
 
 * It would be useful to have a pagespec that always matches all comments on 
   pages matching a glob. Something like `comment(blog/*)`.