update readme with documentation about the possible variables

This commit is contained in:
Gonçalo Valério 2021-05-01 19:34:00 +01:00
parent 4d2cc2501a
commit f2a9eeb3d9
Signed by: dethos
GPG Key ID: DF557F2BDCC2445E
1 changed files with 9 additions and 1 deletions

View File

@ -19,11 +19,19 @@ First you need to have [wrangler](https://github.com/cloudflare/wrangler) correc
1. Clone this repository 1. Clone this repository
2. Create a `wrangler.toml` file based on the existing `wrangler.toml.example` 2. Create a `wrangler.toml` file based on the existing `wrangler.toml.example`
3. Create KV namespaces and their ids to the `kv_namespaces` setting on `wrangler.toml` 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 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. a string of coma separated urls, to each of the RSS/ATOM sources that will be part of your planet.
5. Run `wrangler publish` 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 ## Customize the generated HTML
Each community has its own identity, so you should be able to easily customize the look and feel Each community has its own identity, so you should be able to easily customize the look and feel