Generate a single feed of content from multiple RSS/Atom sources. Runs on Cloudflare Workers.
Go to file
Gonçalo Valério 9e535a1047
Ensure full content is correctly displayed
2021-06-02 22:10:28 +01:00
templates Ensure full content is correctly displayed 2021-06-02 22:10:28 +01:00
.gitignore Add initial working version. 2021-04-25 20:25:37 +01:00
.prettierrc first commit. Generate project structure 2021-04-17 18:03:21 +01:00
CODE_OF_CONDUCT.md first commit. Generate project structure 2021-04-17 18:03:21 +01:00
LICENSE Add initial working version. 2021-04-25 20:25:37 +01:00
README.md fix readme format 2021-05-01 19:35:07 +01:00
index.js Ensure full content is correctly displayed 2021-06-02 22:10:28 +01:00
package-lock.json Add initial working version. 2021-04-25 20:25:37 +01:00
package.json Add initial working version. 2021-04-25 20:25:37 +01:00
wrangler.toml.example add CUSTOM_URL parameter 2021-05-16 20:00:47 +01:00

README.md

Worker-planet

This project is meant to be an easy way to aggregate in a single page content from multiple sources. It takes a list of existing RSS feeds, aggregates their contents and displays them in chronological order.

It was inspired by other software packages such as Planet and MoonMoon but runs on top of Cloudflare Workers instead of being deployed on your own server.

This ends up being specially useful for communities, in order to follow the work being done and published by its members. Some examples of existing "planets" (but using different software):

Note: This project is still in its early days, so expect some rough edges. Any contributions are welcome.

How to deploy

First you need to have wrangler correctly setup on your machine. Then:

  1. Clone this repository
  2. Create a wrangler.toml file based on the existing wrangler.toml.example
  3. Create KV namespaces and add their ids to the kv_namespaces setting on wrangler.toml
  4. Add your account_id and customize all the vars in wrangler.toml. FEEDS should be a string of coma separated urls, to each of the RSS/ATOM sources that will be part of your planet.
  5. Run wrangler publish

Configuration variables

  • FEEDS - list of sources used to fetch the planet's content (separate each url with a comma)
  • TITLE - Name of your planet (included in the generated html page and RSS feed)
  • DESCRIPTION - Free text to be included on the page (currently not used on the included template)
  • MAX_SIZE - Number of posts/entries that will be included on the page/feed
  • CACHE_MAX_AGE - To avoid hitting the KV store each time the content is fetched, the static content is cached. You should adjust this value to the frequency you pick for your cron. Defined in seconds (default: 3600)

Customize the generated HTML

Each community has its own identity, so you should be able to easily customize the look and feel of the generated page. To do so, before publishing you can edit the templates/list_posts.handlebars file.

After you should "precompile" that file using the following command:

$ handlebars templates/list_posts.handlebars -f templates/list_posts.precompiled.js -c handlebars/runtime

Note: You need to have handlebars installed "globally" for this step.