Comments (2)
I really like this! Seems to really align nicely with the createCollection
ideas that we already have. Some random thoughts:
-
Is combining many collections into a single RSS feed something that we want to support? I don't have a real-world example so can't really say how important that is to solve here vs. not worrying about it.
-
It would also be great to demo this on the snowpack.dev example directory. Could we add an RSS feed for news items?
-
Actually that brings up a good question: we aren't currently treating news items as a collection on the Snowpack.dev site. Obviously we could, but it feels a bit like boilerplate if the current "just load it in the component script" is working for us as users, since we plan to keep it all on a single page anyway.
What about something like import {createRSSFeed} from 'astro/runtime'
that you could call anywhere? If that existed, could that function do everything and you just call it inside of createCollection()
? That could nice from a flexibility standpoint, but obviously if there are blockers then migrating the News page of Snowpack.dev to use createCollection
isn't the end of the world (from the point of view of a user).
from astro.
Is combining many collections into a single RSS feed something that we want to support?
I don‘t think so. The current plan was just to add multiple <link>
tags to your site
It would also be great to demo this on the snowpack.dev example directory. Could we add an RSS feed for news items?
Yeah! That’d be a good test.
Actually that brings up a good question: we aren't currently treating news items as a collection on the Snowpack.dev site. Obviously we could, but it feels a bit like boilerplate if the current "just load it in the component script" is working for us as users, since we plan to keep it all on a single page anyway.
The nice part about Astro.fetchContent()
is you can use that anywhere. If you don‘t need pagination, you don‘t have to use a collection.
What about something like
import {createRSSFeed} from 'astro/runtime'
that you could call anywhere? If that existed, could that function do everything and you just call it inside ofcreateCollection()
?
The original goal was just to save you having to load data in two places, but you do raise a good point: there‘s nothing specifically tying an RSS feed to a collection. I do think that “calling it anywhere” could introduce some complications, such as determining its final URL, can it be loaded from components, etc. and we’d have to throw a lot of errors if it‘s used unexpectedly. We could also start talking about the idea of non-HTML .astro
components too (e.g. /rss.astro.xml
)!
from astro.
Related Issues (20)
- Toolbar audit incorrectly flagging images as above the fold HOT 3
- React component not showing only on dev HOT 3
- Astro DB: there is no way of creating a primary key composed of several columns HOT 2
- Warning: ReactDOMServer.renderToStaticNodeStream() is deprecated. HOT 2
- npx astro add fails on Node 22 HOT 6
- Viewtransition calls page twice on hover (prefetch) and on click HOT 6
- Build fails when using <style>. HOT 2
- Can't forward concrete `HTMLAttributes` when using `Polymorphic` component HOT 2
- Astro glob throw unsupported files for svg HOT 7
- Animations using svelte-motion break in deployed Astro + Svelte website. HOT 5
- Node SSR breaks when `X-Forwarded-Host` includes port and `X-Forwarded-Port` is also sent
- The image size isn't changing when viewport changes (Image/Picture built-in component) HOT 5
- Deprecation warning for `ReactDOM.renderToStaticNodeStream` used in `@astrojs/react/server.js` HOT 1
- Query Params are stripped HOT 1
- Adobe react spectrum not working (Unknown file extension ".css" )
- Asset links are not bundled in .html files HOT 3
- `NotificationPayload` type is not correct.
- toolbar: `toggleState` is not working. HOT 2
- ⚠️ Duplicated file name anywhere inside the `src/` folder. Not Allowed? HOT 11
- React 19 Beta throws error when starting astro dev server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astro.