Re:Ask PG: Link to comments in RSS
by pg on Saturday February 09, 2008 @12:31PM
(#112730)
There are comment links in the rss feed. Some readers show them and some don't. If anyone can give me the exact syntax that would work in the latter, I'll try it.
[ Parent
| on HN ]
<item>
<title>Ask PG: Link to comments in RSS</title>
<link>http://news.ycombinator.com/item?id=112684</link>
<comments>http://news.ycombinator.com/item?id=112684</comments>
<description>
<a href="http://news.ycombinator.com/item?id=112684">comments</a>
</description>
</item>Or like this:
<item>
<title>Ask PG: Link to comments in RSS</title>
<link>http://news.ycombinator.com/item?id=112684</link>
<description><![CDATA[<a href="http://news.ycombinator.com/item?id=112684">Comments</a>]]></description>
</item>Ok, does it work now? Here's what I'm doing:
(def rss-stories (stories)
(tag (rss version "2.0")
(tag channel
(tag title (pr this-site*))
(tag link (pr site-url*))
(tag description (pr site-desc*))
(each s stories
(tag item
(let comurl (+ site-url* (item-url s))
(tag title (pr (eschtml (s 'title))))
(tag link (pr (if (blank (s 'url))
comurl
(eschtml (s 'url)))))
(tag comments (pr comurl))
(tag description
(pr "<![CDATA[")
(link "Comments" comurl)
(pr "]]>"))))))))Bloglines now shows the link twice, one from <comments> and one from <description>.
Argh. Can anyone tell me a format that will work on all readers? Is the answer to ditch the comments field?
I also see them twice, but it doesn't bother me. Just leave it as it is.
On 20/2 at around 8:15 pm GMT, the comments link disappeared again for me (in Vienna). What's going on?
It works in Google Reader!
Thanks!
Yep - another confirm - comment linked working in google reader now - thanks!
Thanks PG - confirm everything appears to be completely working now!
Re:Ask PG: Link to comments in RSS
by pestilence on Saturday February 09, 2008 @10:08PM
(#112869)
It's working in akregator now (wasn't working before).