Publish a subscribable calendar
This publishes your published meal plans as a single calendar
file (.ics) to a GitHub repository you own, served by
GitHub Pages as text/calendar. A calendar app (e.g. Google
Calendar) can then subscribe to its URL and refresh it
as you republish. It is optional and device-local:
your token and settings stay in this browser and are never shared or
synced to your account.
Before you start — the tradeoff
Publishing needs a GitHub token that can write to your repository, and that token lives in your browser. By default arecipe keeps it in the service worker's memory so page scripts can't read it, and re-asks for it after a period of inactivity. If you tick “Remember on this device”, the token is stored in this browser instead — more convenient, but readable by any script running on this origin. Reduce the blast radius:
- Use a dedicated repository that holds nothing else.
- Disable Actions on that repository (Settings → Actions → “Disable actions”), so a leaked token can't run workflows.
- Give the token the shortest expiry you can live with.
- Revoke it the moment you're done experimenting.
1 · Create the repository + enable Pages
- Create a new repository (private is fine) — e.g.
your-name/meals-calendar. - Open Settings → Pages and set the source to your
default branch (root). GitHub Pages serves
.icsfiles astext/calendar, which is what calendar apps require. - Open Settings → Actions → General and choose Disable actions.
2 · Create a fine-grained token
- Go to fine-grained personal access tokens.
- Repository access: “Only select repositories” → just the calendar repo above.
- Permissions: Repository permissions → Contents: Read and write. (Metadata: Read-only is added automatically.)
- Set a short expiration and generate the token. Copy it once — GitHub won't show it again.
3 · Connect it in arecipe
- On the account page, open “Publish a subscribable calendar (advanced)” and tick Enable on this device.
- Enter the repository (
owner/repo) and, if you like, a file path (defaultmeals.ics). - Paste the token and Save token. Decide whether to tick “Remember on this device” (see the tradeoff above).
- Press Publish now to write the first calendar file.
After this, publishing a meal plan (or deleting a published one) updates the calendar automatically; the Meals page shows a small status chip with a manual Resync.
4 · Subscribe in your calendar app
Your file lives at your Pages URL, e.g.
https://your-name.github.io/meals-calendar/meals.ics (or
your custom domain). In Google Calendar: Other calendars → “+”
→ From URL, paste that URL.
Note: calendar apps poll subscribed URLs on their own schedule — Google's can take several hours — so updates are not instant. This is a subscription that refreshes eventually, not a live feed.
Revoking
Remove the token any time from your GitHub token settings, and press Clear token on the account page. If you ever suspect the token leaked, revoke it immediately — that is the whole point of the short expiry and dedicated repo.