-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements rss feed #17
Conversation
Hey @bordalix thanks for your work here! Sorry it's taken me so long to respond. Been sick with the plague! I don't know much about the expectations of RSS readers, but given that the feed isn't static and isn't simply adding items (the order changes with ranking), do we need to do anything special to account for this or will they work as expected? |
Hey huumn, I am the one who originally suggested the RSS capability both on the website itself and by opening up the GitHub issue. One possible solution to the order change could be to have it implemented through the recent tab only. So the feed url could look something like this: https://stacker.news/recent/rss whereas https://stacker.news/rss would return an error for inability to find a feed if it were to be added. Since the recent order does not change, it would function as a static feed for people who want to get updates to posts via RSS. That was my initial reason for requesting RSS functionality since I had originally bookmarked the recent link rather than the link to the actual home page. As far as expectations, being able to see a new post when it's live is the idea. Unless there was a way to enable notifications, that would be the best way to "push" new content to people who might not want to check the website dozens of times a day to see if there is any new content. I never expected that I would be able to fully interact with the website through RSS. Just a link if there is one in the post and the content if there is any with a way to open up a link to the post in the browser if I wanted to boost the post or comment on it. Hopefully you're feeling better! |
Hi @anthonyvardizzone! Thanks for requesting the feature. I definitely think it's a value add to the site. Having a recent rss feed is a good addition too. I imagine we can make the main page rss feed work too but I just don't know enough about it to know if we need to do anything special to make it work. Hacker News has an RSS feed for their main page so it seems possible https://news.ycombinator.com/rss ... It seems like they just generate it periodically and don't do anything special to make it work so maybe we don't either. (Thanks for the well wishes too. Feeling 100% now.) |
@bordalix I'm inspecting this branch locally but struggling to see the RSS feed. Do you know why? I'm probably doing something dumb, but I just see a blank page even with curl or wget. |
Hi huumm, 100% is excellent :) I use the Hacker News RSS feed and its based on Created At. |
Check the graphql query, I was not able to test it. |
With dummy data I have it working on my side:
|
Yeah I have it working now. It was the graphql query like you said! |
Related to #16
A SSR solution for a RSS feed:
It's also possible to use a SSG solution (ex: /public/rss.xml file):
Note, I was not able to properly test the query.