Skip to content
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

[Feature]: RSS feed #828

Closed
slorber opened this issue Mar 20, 2024 · 11 comments · Fixed by #851
Closed

[Feature]: RSS feed #828

slorber opened this issue Mar 20, 2024 · 11 comments · Fixed by #851
Assignees

Comments

@slorber
Copy link

slorber commented Mar 20, 2024

What problem does this feature solve?

We should be able to follow project release blog posts thanks to a RSS feed.

For example, I'd like to be notified whenever there is a new release here:
https://rsbuild.dev/community/releases/

Docusaurus blogs have this out of the box: https://docusaurus.io/blog/rss.xml

What does the proposed API look like?

No idea what the API should look like sorry 😅 Maybe it's not even a goal of this project, or maybe it should be part of the "blog theme" that is in the roadmap? (#133)

Tasks

Preview Give feedback
No tasks being tracked yet.
@chenjiahan
Copy link
Member

@xc2 has implemented an RSS plugin for the Rspack website (https://github.com/web-infra-dev/rspack-website/issues/543), maybe we can make it as an official Rspress plugin and integrate it into the Rsbuild / Rspress websites.

@xc2 Can you help with this? ❤️

@xc2
Copy link
Collaborator

xc2 commented Mar 20, 2024

@chenjiahan assign to me pls.

let me check the latest rspress api

@xc2
Copy link
Collaborator

xc2 commented Mar 20, 2024

i’m occupied by office tasks recently, so i’ll begin the work this weekend.

@chenjiahan
Copy link
Member

@slorber
Copy link
Author

slorber commented Apr 5, 2024

Thanks

Rspack already had a feed afaik.

Rsbuild now has one, but it is still not discoverable because the meta tag is not added:

<link data-rh="true" rel="alternate" type="application/rss+xml" href="/rss/blog-en.rss" hrefLang="en"/>

CleanShot 2024-04-05 at 14 28 59@2x

Also I think the feed should rather be sorted in the opposite order (newest first)

@chenjiahan
Copy link
Member

chenjiahan commented Apr 5, 2024

Thanks for the feedback, it seems like a bug of @rspress/plugin-rss, @xc2 should we generate a meta tag for the home page? 😄

@xc2
Copy link
Collaborator

xc2 commented Apr 5, 2024

Thanks for the feedback, it seems like a bug of @rspress/plugin-rss, @xc2 should we generate a meta tag for the home page? 😄

Should add frontmatter link-rss for homepage.

https://rspress.dev/plugin/official-plugins/rss.html#linking-rss-to-document-pages

Eg

---
link-rss: release
---
---
link-rss:
- release
- blog
---

@xc2
Copy link
Collaborator

xc2 commented Apr 5, 2024

Also I think the feed should rather be sorted in the opposite order (newest first)

I'm using both inoreader and thunderbird, and both of them sort articles based on the pubDate by default when i'm adding a subscription.

image

image

anyway I'll create a pr to add the sorting feature as i'm not sure if most of the rss readers will sort items well.

@slorber
Copy link
Author

slorber commented Apr 5, 2024

Yes most will sort themselves, but some will not. Also sooner or later you'll have users with large user bases and hundreds of blog posts and feeds of many megabytes and you'll need to add a truncate feed feature otherwise feed readers won't download a 100mb feed 😄

@xc2
Copy link
Collaborator

xc2 commented Apr 5, 2024

Yes most will sort themselves, but some will not. Also sooner or later you'll have users with large user bases and hundreds of blog posts and feeds of many megabytes and you'll need to add a truncate feed feature otherwise feed readers won't download a 100mb feed 😄

thank you for your helpful advise.

with this plugin, there's way to truncate content atm: https://rspress.dev/plugin/official-plugins/rss.html#item

though it is not applied by default as i didn't find a cheap and good enough strategy that can be applied as default solution.

@chenjiahan
Copy link
Member

chenjiahan commented Apr 6, 2024

After fixing some bugs, rsbuild.dev can now be correctly recognized by ioreader. Thanks for all the suggestions ❤️

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants