feat: provide rss, atom and json feeds for the blog#2562
feat: provide rss, atom and json feeds for the blog#2562Kiwow wants to merge 5 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| 📦 Package | 📋 Versions |
|---|---|
| h3 | 5 versions
h3@2.0.1-rc.11 h3@2.0.1-rc.16 h3@2.0.1-rc.20 |
| oxc-parser | 5 versions
|
| @oxc-parser/binding-wasm32-wasi | 5 versions
|
| glob | 5 versions
|
| @rolldown/pluginutils | 5 versions
@rolldown/pluginutils@1.0.0-rc.9 |
| @oxc-project/types | 7 versions
|
| @oxc-parser/binding-android-arm64 | 5 versions
|
| @oxc-parser/binding-darwin-arm64 | 5 versions
|
| @oxc-parser/binding-darwin-x64 | 5 versions
|
| @oxc-parser/binding-freebsd-x64 | 5 versions
|
| @oxc-parser/binding-linux-arm-gnueabihf | 5 versions
|
| @oxc-parser/binding-linux-arm-musleabihf | 5 versions
|
| @oxc-parser/binding-linux-arm64-gnu | 5 versions
|
| @oxc-parser/binding-linux-arm64-musl | 5 versions
|
| @oxc-parser/binding-linux-riscv64-gnu | 5 versions
|
| @oxc-parser/binding-linux-s390x-gnu | 5 versions
|
| @oxc-parser/binding-linux-x64-gnu | 5 versions
|
| @oxc-parser/binding-linux-x64-musl | 5 versions
|
| @oxc-parser/binding-win32-arm64-msvc | 5 versions
|
| @oxc-parser/binding-win32-x64-msvc | 5 versions
|
💡 To find out what depends on a specific package, run: pnpm -r why example-package
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| const atomPath = 'atom.xml' | ||
| const jsonFeedPath = 'feed.json' | ||
|
|
||
| await Promise.all([ |
There was a problem hiding this comment.
Maybe instead of saving these files to disk, creating pre-rendered server-side routes could be a cleaner approach 🤔. Similar to server/routes/opensearch.xml.get.ts with https://nuxt.com/docs/4.x/getting-started/prerendering#selective-pre-rendering
There was a problem hiding this comment.
Sounds like exactly what I was looking for and didn't find. Thanks!
I'll add a mention of this to the PR description and look into it when I have time to work on this again.
I'm opening this as a draft so that progress on it is transparent. Feedback is appreciated even before it's ready!
🔗 Linked issue
Resolves #2489
The plan
feedpackagemodules/blog.tsis creating in.nuxt/blog/posts.ts, possibly in the same module setup<link rel="alternate">elements for readers to find the feedsChecklist
Before merging, I need to make sure that:
Issues / obstacles:
The feed package currently doesn't support JSON Feed 1.1, which added support for multiple authors. This means it silently throws away all but the first author we specify in an the
authorarray. Manually parsing the object after it gets generated and adding in the other authors is an option, but then we'd be lying about the version that we're serving. Alternatively, it shouldn't be that hard to write the JSON Feed serializer ourselves (thefeedimplementation is a bit over 100 lines of code)RSS (the spec) seemingly doesn't support multiple authors at all, or just in convention, where you put everyone into an
<author>tag. I'll have to try and test some readers / find how feeds handle multiple authors to figure out a good solution. Either way, thefeedpackage includes multiple<author>tags, which seems to be valid in Atom but not in RSS.