Revela

Calendar Feeds

The Source.Calendar plugin downloads iCal feeds (.ics URLs) into your source/ folder. Use it together with the Availability Calendar plugin: your booking platform or calendar app keeps the bookings, and Revela fetches the latest version before each build.

Overview

๐Ÿ”— Any iCal URL

Works with the export or subscription link of Google Calendar, Outlook, Airbnb, Booking.com and most booking tools.

๐Ÿ—‚๏ธ Named Feeds

Configure several feeds and fetch all of them, or just one by name.

๐Ÿ›ก๏ธ Safe Updates

If a download fails, the previous file is kept, so your calendar never ends up empty.

Installation

The Standalone edition has Source.Calendar built in. In the Full edition, install it from the bundled packages:

revela plugin install Source.Calendar

Configuration

Add your feeds to project.json below plugins.calendarFeeds. Each feed has a name, the URL to download, and the file to write, relative to your source folder:

{
  "plugins": {
    "calendarFeeds": {
      "feeds": {
        "bookings": {
          "url": "https://calendar.example.com/export/bookings.ics",
          "output": "availability/bookings.ics"
        }
      }
    }
  }
}
Option Required Description
url Yes The iCal feed URL (http or https)
output Yes Target file below the source folder, for example availability/bookings.ics

There is no revela config command for feeds; edit project.json directly.

Feed URLs often contain a private token. To keep it out of project.json (for example in CI), set it as an environment variable instead:

SPECTARA__REVELA__PLUGINS__CALENDARFEEDS__FEEDS__BOOKINGS__URL=https://calendar.example.com/export/bookings.ics?token=...
SPECTARA__REVELA__PLUGINS__CALENDARFEEDS__FEEDS__BOOKINGS__OUTPUT=availability/bookings.ics

Usage

# Download all configured feeds
revela source calendar fetch

# Download only one feed
revela source calendar fetch --name bookings
โœ“ bookings โ†’ availability/bookings.ics

Fetched 1 feed(s) (4.2 KB)

Fetching is not part of revela generate all. Run it before you build:

revela source calendar fetch
revela generate all

Then point a calendar page at the downloaded file with calendar.source = "bookings.ics" in source/availability/_index.revela (see Availability Calendar).

In a CI workflow, add ./revela source calendar fetch before ./revela generate all (see Deployment), and run the workflow on a schedule so the calendar stays up to date.

Error Handling

If the calendar page complains about a missing or broken file afterwards, run revela check calendar.

CLI Commands

Command Description
revela source calendar fetch Download all configured feeds
revela source calendar fetch --name <feed> Download one feed (-n)