The website
The site repo behind katlendar.date and dev.katlendar.date: the Worker, the guide, the privacy statement and terms, and the addresses that must never break.
The website lives in its own repo, kud3n013/katlendar-site. The app repo's site/ folder only sends visitors of the old GitHub Pages address on to katlendar.date; don't edit the website there.
What is in the repo#
| Path | What it is |
|---|---|
public/ | the pages, served as they are: the home page, privacy/, terms/, 404.html |
public/_redirects | sends /help/google and /help/microsoft on to the guide |
public/_headers | security headers, and the JSON type of the .well-known file |
public/.well-known/ | microsoft-identity-association.json (see Integrations) |
guide/ | the guide, one Markdown page each |
dev/ | this manual, one Markdown page each |
scripts/build-guide.mjs, scripts/build-dev.mjs | turn them into HTML |
scripts/markdown.mjs, scripts/guide.css | the Markdown and the look both builds share |
src/worker.js | the script that answers the release addresses |
wrangler.jsonc, wrangler.dev.jsonc | the two Workers' settings |
The Worker#
katlendar.date is a Cloudflare Worker, katlendar-site. It serves the files in public/. Its script, src/worker.js, only answers the addresses that depend on the newest release:
/releases.json: GitHub's release list, trimmed, for the update check;/download: on to the download section of the home page;/download/<system>: the newest release's file for that system.
Releases lists them. Everything else is a plain file.
dev.katlendar.date is a second Worker, katlendar-dev, from wrangler.dev.jsonc. It has no script and only serves the built manual in public-dev/.
Both attach their address as a Workers custom domain, which makes the DNS record by itself.
Deploying#
Every push to main deploys both, through .github/workflows/deploy.yml:
- build the guide and this manual;
wrangler deployfor katlendar.date;wrangler deploy --config wrangler.dev.jsoncfor dev.katlendar.date.
The repo needs the secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID. The README explains how to make them, and the settings made once in the Cloudflare dashboard (www, DNSSEC, HTTPS, mail records).
To try it on your own computer:
node scripts/build-guide.mjs && npx wrangler dev
node scripts/build-dev.mjs && npx wrangler dev --config wrangler.dev.jsonc
Addresses that never break#
Installed copies of the app call addresses on katlendar.date, and keep calling them for years. The README's first table lists every one: what it does and what uses it. Never remove one. You may change where it points.
When the app gains a link, add its address to that table and to the app's CLAUDE.md (see Conventions).
Before tagging an app release, check that they answer. The README has the curl commands.
The guide#
The guide at /guide/ explains every feature to the people who use katlendar. Each page in guide/ starts with a title and a description and is listed in NAV in scripts/build-guide.mjs. Besides plain Markdown, the pages understand:
> [!tip],> [!note]and> [!warning]callouts;- keys in braces, as
{Ctrl+T}; - a term followed by a
: meaningline; - links to other pages written
page#heading.
The build stops on a link to a missing page, heading or picture, and on a missing heading the app links to (see Guide links).
Pictures come from the app's --screenshot (see Testing). They are cropped with ffmpeg and saved as WebP in public/guide/img/.
A change people can see in the app also needs its guide page updated.
This manual#
Pages in dev/ work like the guide's and are listed in NAV in scripts/build-dev.mjs. The manual describes the code, so a change in the app can make a page wrong. Check facts against the app repo before writing them down, and update the page when you change what it describes.
Privacy statement and terms#
public/privacy/index.html and public/terms/index.html are written by hand, in HTML. They name the developer, say what the app and the site do with data, and say what the terms are.
Microsoft's app registration links to both, and Google's consent screen will too. So they must stay at /privacy/ and /terms/.
Update them whenever data handling changes, before the change ships. For example:
- a new service the app talks to, such as a calendar provider or a map service;
- something new sent to a service the app already uses;
- a change to what is stored, where, or for how long;
- a change to the update check or to what the website logs.
Then change the "Effective" date at the top of each page you changed. Earlier versions stay in the site repo's history.
The privacy statement has a section for each kind of data: accounts, Google user data, Microsoft user data, maps, the update check and the website. Add to the right one, or add a section.