fix comment permalink to always point to comment parent page

master
Joey Hess 2008-12-19 17:33:40 -05:00
parent 0b002b79b7
commit 301733ba13
2 changed files with 2 additions and 4 deletions

View 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};
}

View 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/*)`.