From 029ad0bc0fc176bd8c62d04cdc94b3468c195035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo?= Date: Fri, 19 Apr 2024 19:46:14 +0100 Subject: [PATCH] improvements to the README file --- README.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 605b2ae..29f8e65 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,41 @@ # Worker-planet -This project is meant to be an easy way to aggregate in a single page content from multiple sources. +This project is meant to be an easy way to aggregate, on 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](https://moonmoon.org/) but runs on top of Cloudflare Workers instead of being deployed on your own server. +It was inspired by other software packages, such as [Planet]() and [MoonMoon](https://moonmoon.org/), 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): +This ends up being especially useful for communities to follow the work being done and published by their members. + +Below are some examples of existing "planets" that use different software: - https://planet.debian.org/ - https://planet.kde.org/ - https://planet.gnome.org/ -**Note:** This project is still in its early days, so expect some rough edges. Any contributions are welcome. +An example of a live planet using `worker-planet` software is: + +- https://infosecplanet.ovalerio.net + +_If you wish to add your deployment to this list, feel free to create a PR._ # How to deploy -1. Clone this repository -2. Install the project dependencies: `npm install` -3. Create a `wrangler.toml` file based on the existing `wrangler.toml.example` -4. Create KV namespaces and add their ids to the `kv_namespaces` setting on `wrangler.toml` -5. 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. -6. Build the worker bundle: `npm run build` -7. Deploy your new worker: `npm run deploy` +1. Clone this repository. +2. Install the project dependencies: `npm install`. +3. Create a `wrangler.toml` file based on the existing `wrangler.toml.example`. +4. Create KV namespaces and add their IDs to the `kv_namespaces` setting on `wrangler.toml`. +5. Add your `account_id` and customize all the `vars` in `wrangler.toml`. `FEEDS` should be a string of comma-separated URLs, one for each of the RSS/ATOM sources that will be part of your planet. +6. Build the worker bundle: `npm run build`. +7. Deploy your new worker: `npm run deploy`. -**Note:** For the last step you might need to set the `CLOUDFLARE_API_TOKEN` environment variable. +**Note:** For the last step, you might need to set the `CLOUDFLARE_API_TOKEN` environment variable. ## 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) +- **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) @@ -37,9 +43,9 @@ This ends up being specially useful for communities, in order to follow the work ## 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 one of the existing templates in the `templates` folder. +of the generated page. To do so, before publishing, you can edit one of the existing templates in the `templates` folder. -After, you should "precompile" that file using the following command: +After that, you should "precompile" that file using the following command: > \$ npm run template -- templates/default.handlebars -f templates/default.precompiled.js