‹ Back to account

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:

1 · Create the repository + enable Pages

  1. Create a new repository (private is fine) — e.g. your-name/meals-calendar.
  2. Open Settings → Pages and set the source to your default branch (root). GitHub Pages serves .ics files as text/calendar, which is what calendar apps require.
  3. Open Settings → Actions → General and choose Disable actions.

2 · Create a fine-grained token

  1. Go to fine-grained personal access tokens.
  2. Repository access: “Only select repositories” → just the calendar repo above.
  3. Permissions: Repository permissions → Contents: Read and write. (Metadata: Read-only is added automatically.)
  4. Set a short expiration and generate the token. Copy it once — GitHub won't show it again.

3 · Connect it in arecipe

  1. On the account page, open “Publish a subscribable calendar (advanced)” and tick Enable on this device.
  2. Enter the repository (owner/repo) and, if you like, a file path (default meals.ics).
  3. Paste the token and Save token. Decide whether to tick “Remember on this device” (see the tradeoff above).
  4. 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.