This project is a serverless RSS feed generator built with Cloudflare Workers. It allows you to generate RSS feeds from various sources and serve them to subscribers.
- Fetches RSS feeds from multiple sources
- Combines the feed items into a single RSS feed
- Supports sorting of feed items by publication date
- Serverless architecture using Cloudflare Workers
Before running the project, make sure you have the following:
- Cloudflare account
- Wrangler CLI installed and configured with your Cloudflare account credentials
- RSS feed URLs that you want to generate the combined feed from
- Clone the repository:
git clone https://github.com/DavidJKTofan/xml-feed-generator
- Navigate to the project directory:
cd serverless-rss-feed-generator
- Install dependencies:
npm install
-
Open the
worker.js
file in a text editor. -
Update the
feedUrls
array with the URLs of the RSS feeds you want to generate the combined feed from. -
Customize the channel title, link, and description in the
handleRequest
function to match your desired feed details.
To deploy the serverless RSS feed generator to Cloudflare Workers:
- Configure your Cloudflare account credentials:
wrangler config
- Build and publish the project to Cloudflare Workers:
npm run deploy
Or alternatively:
wrangler publish
- Note the generated Worker URL provided by Cloudflare.
To use the serverless RSS feed generator:
-
Access the Worker URL in a web browser or use it as the feed URL in an RSS reader.
-
The serverless RSS feed generator will fetch and combine the feeds from the specified URLs and serve the generated feed as an RSS XML response.
You can customize the behavior and appearance of the serverless RSS feed generator by modifying the worker.js
file.
- Add or remove feed URLs in the
feedUrls
array to fetch feeds from different sources. - Adjust the sorting logic in the
handleRequest
function to change the order of the feed items. - Modify the XML structure and content generation to customize the appearance of the generated RSS feed.
Contributions are welcome! If you have any suggestions, bug reports, or improvements, please submit an issue or a pull request.
This project is licensed under the MIT License.