Hacker News new | past | comments | ask | show | jobs | submit login
Ask PG: Link to comments in RSS
18 points by hugov on Feb 9, 2008 | hide | past | favorite | 22 comments
Like many of you, I read Hacker News through an RSS reader. The Hacker News RSS only has title links, no preview or link to the comments page (unless the item has no URL, like this one). To go to the comments page, you have to navigate to news.ycombinator.com, find the item you want, and click on comments. PG: can you please add a link to the comments page from the body of each RSS item. Thanks!



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.


  <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>
      &lt;a href="http://news.ycombinator.com/item?id=112684"&gt;comments&lt;/a&gt;
    </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?


Yep - another confirm - comment linked working in google reader now - thanks!


Thanks PG - confirm everything appears to be completely working now!


It's working in akregator now (wasn't working before).


It works in Google Reader!

Thanks!


I brought this up a while ago here: http://news.ycombinator.com/item?id=35363

I was using Google Reader, and there was no comments link, but have since switched to NetNewsWire (OS X) where everything works correctly. It doesn't look like it'll change.


That's really odd. NNW for me doesn't show links, and never has...hmm, too bad it doesn't keep track of when I subscribe to feeds, but I'm fairly sure that's how it's always been for me.


Hmm, actually it might depend on the theme you're using. I'm using the Ollicle Reflex theme (http://www.ollicle.com/2006/nov/28/jquery_netnewswire_style....) and it displays the comments link neatly in the right column.


A while ago someone (sorry, forget the name) created an alternative feed which shows a link to the comment page: http://harumi.ath.cx/newsyc

Works fine with Google-Reader.


I'm using Vienna (OS X) which as far as I can tell works perfectly for every one of the other 200+ feeds I subscribe to - but not for Hacker News. It looks like simply replacing the <comments> tag with a description tag containing (only) a hyperlink to the comments page would fix the problem. Many readers ignore the <comments> tag.


Whatever's up now is working with Vienna. I see a comments link.


I see links to comment pages for all items, so perhaps it's your RSS reader?

But it would be nice to see the submission text.


NetNewsWire shows link to comments


I don't see links as well. I'm using Google Reader.


+1 :-) I don't see links to comment pages for all items... using google reader




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: