Skip to content

Calendar

Available format: calendar turns a story into a calendar: one event per scene, written in the wall time of its zone. The same file is shown as a month, a week, an agenda and a year, filtered by tag and read in the reader's own zone on request; each event has its own page, and the calendar is exported to a feed that any calendar app subscribes to (.ics) and to a PDF.

The examples are calendar-meetups (JSON, two languages) and calendar-course (Markdown, two languages, recurrences across the changes of time); calendar.recit.dev shows both, and the releases of Récit. Times, zones and the changes of time have their own page: Time zones and changes of time.

A minimal calendar

Markdownmeetups.md
--- title: Lorem Meetups format: calendar lang: en timezone: Europe/Paris view: month --- --- id=kickoff start=2026-11-05T18:30 end=2026-11-05T20:30 location="Lorem Hall, Ipsum" tags=meetup ## Kickoff meetup Lorem ipsum dolor sit amet, consectetur adipiscing elit. --- id=office-hours start=2026-11-03T10:00 duration=1h rrule="FREQ=WEEKLY;BYDAY=TU;COUNT=8" timezone=America/New_York url=https://example.com/live ## Office hours --- id=retreat date=2026-12-10 end=2026-12-12 ## Ipsum retreat
TerminalBash
npx recit dev meetups.md
AttributeWhat it is
starta wall time, YYYY-MM-DDTHH:MM, in the event's timezone, else the calendar's
end or durationone or the other, never both. duration: 1h, 90m, 1h30m or ISO 8601 (PT1H30M)
datean all-day event; with end (a date), over several days, end included
timezonean IANA zone (America/New_York); not on a date event
rrule, exdatean RFC 5545 rule without its RRULE: prefix; the dates it skips, comma-separated, written like start
locationfree text, @id of an entry of the places directory, or a place in JSON ({"name": …, "city": …, "geo": [lat, lon]})
url, tagsa link (a video call, tickets), tags the views filter on
statusconfirmed (default), tentative, cancelled: a cancelled event stays, struck through, STATUS:CANCELLED
deck, filma linked story: "See the deck", "See the film"
registerthe sign-up form: its anchor (#form-signup for :::form{#signup}), a path or an address; "Register" opens it with ?recit-about=<event id>, sent as meta.about
colora lightness of the site's hue, soft, base or strong, never a free color
the heading and bodythe first heading is the event's title, the rest its description, in full Markdown

The attributes fit on the separator line. A long one is written in JSON instead (--- {"id": "office-hours", …}).

Settings

In the front matter, or for every calendar of a folder in the calendar: section of recit.config.ts (the front matter wins).

SettingDefaultWhat it does
timezonenonethe zone of the wall times; required once an event has a time
viewmonththe view shown first: month, week, agenda or year
firstDaythe language'smonday, sunday or saturday
window{ past: P3M, future: P12M }the occurrences computed around the build day, past and future as ISO durations
maxOccurrences500the most occurrences computed per event
noOverlapfalsetwo overlapping occurrences are an error
urlnonewhere the calendars are published (https://…/calendar/): the host of the UIDs
placesnonethe directory story that resolves location=@id, relative to the calendar's folder
pdfA4 portrait, a monthrecit export --to pdf: view (month or agenda), from, months, the page box

include: lists the roadmaps whose milestones join the calendar; it belongs to the story, so it is written in the front matter only (Bridges). The pdf key takes the PDF options of every paginated format (page, toc, header, footer, colorMode, output…), plus view, from and months.

TypeScriptrecit.config.ts
import { defineConfig } from "recit/config"; export default defineConfig({ i18n: { defaultLocale: "en", locales: ["en", "fr"] }, calendar: { timezone: "Europe/Paris", firstDay: "monday", window: { past: "P3M", future: "P12M" }, url: "https://example.com/calendar/", places: "./places.md", pdf: { view: "agenda", months: 3 }, }, });

The JSON twin

A calendar is the same story in Markdown and in JSON (kind: "story", checked by https://recit.dev/schema/v1/calendar.json), converted both ways by recit convert. In JSON, a title, a description and a place's name hold one value per language; the times, the rules and the places do not change from one language to the other.

JSONmeetups.json
{ "$schema": "https://recit.dev/schema/v1/calendar.json", "kind": "story", "version": 1, "format": "calendar", "meta": { "title": { "en": "Lorem Meetups", "fr": "Rencontres Lorem" }, "lang": "en" }, "settings": { "timezone": "Europe/Paris", "view": "month" }, "scenes": [ { "id": "kickoff", "title": { "en": "Kickoff meetup", "fr": "Rencontre de lancement" }, "start": "2026-11-05T18:30", "end": "2026-11-05T20:30", "location": { "name": { "en": "Lorem Hall", "fr": "Salle Lorem" }, "city": "Ipsum", "geo": [48.85, 2.35] }, "tags": ["meetup"], "body": { "en": "Lorem ipsum dolor sit amet.", "fr": "Lorem ipsum dolor sit amet." } } ] }

In Markdown, the French variant is a file beside the first, course.fr.md beside course.md, with the same ids, times and rules.

Alongside scenes.id and scenes.body (see Scenes › In the JSON twin) and the schedule, scenes.title, scenes.tags and scenes.location (location.name, location.city, location.geo, or a free-text / @id string) fields shown above, each event in scenes accepts these keys:

KeyType / valuesEffect
scenes.allDaybooleanImplied by scenes.date; setting allDay: true together with scenes.start is an error (calendar-start).
scenes.urlstring (URI)Event link (such as a video call or ticket office), exported as URL in .ics and used as the online URL in JSON-LD when unplaced.
scenes.status"confirmed" | "tentative" | "cancelled"Event status ("confirmed" when omitted; "cancelled" keeps the event struck through and writes STATUS:CANCELLED in .ics).
scenes.deckstring (non-empty)Link to a related deck ("See the deck" on the event detail and event page).
scenes.filmstring (non-empty)Link to a related film ("See the film" on the event detail and event page).
scenes.registerstring (non-empty)The sign-up form: its anchor (#form-signup for :::form{#signup}), a path or an address; « Register » opens it with ?recit-about=<event id>.
scenes.color"soft" | "base" | "strong"Lightness variant of the site's hue on the event card ("base" when omitted), never an arbitrary CSS color.
scenes.notesstring or Record<string, string>Optional author notes in Markdown (:::notes; Scenes).
scenes.attrsRecord<string, string | number | boolean>Optional separator attributes (--- key=value) not covered by a typed event field (Scenes).
location.addressstringFree-text display address on an inline scenes.location place, shown as written and never parsed into structured postal fields.
location.streetstringStreet address on an inline scenes.location place.
location.postcodestringPostal code on an inline scenes.location place.
location.regionstringRegion, state or administrative area on an inline scenes.location place.
location.countrystring (^[A-Z]{2}$)ISO 3166-1 alpha-2 country code (such as "FR") on an inline scenes.location place.

Commands

CommandWhat it does
recit dev meetups.mdthe calendar with live reload
recit build meetups.md -o distthe four views and a page per event, prerendered in the calendar's zone (-o, --output, ./dist)
recit validate meetups.mdthe story against its schema and the rules below
recit convert meetups.md --to json -o meetups.jsonthe JSON twin; --to md goes back to Markdown (--locale fr picks the language)
recit convert agenda.ics --to mdimports an iCalendar file; what Récit does not read (ATTENDEE, VALARM, X-…) is listed as warnings
recit export meetups.md --to ics -o meetups.icsthe feed: one VEVENT per event, RRULE and EXDATE kept, a VTIMEZONE per zone, stable UIDs
recit export meetups.md --to pdf -o meetups.pdf --color-mode darka page per month, or the agenda, A4 portrait (--color-mode light or dark)

-o, --output names the file (a folder for build); without it the export is written beside the story, meetups.ics or meetups.pdf, and listed in exports.json (--no-manifest leaves the manifest alone). --locale fr exports one language of a bilingual calendar. Every command and its flags are in the CLI reference.

The feed

The feed carries REFRESH-INTERVAL and X-WR-CALNAME for the apps that subscribe to it; the "Subscribe" button of a page offers webcal://, Google Calendar, Outlook and the file itself, with no third-party script. A site build writes /calendar/<slug>.ics (and /fr/calendar/<slug>.ics) and one /calendar/<slug>/<id>.ics per event, all listed in exports.json. Serve .ics files as text/calendar; charset=utf-8.

The rules

recit validate reports each one with its file and line, or its JSON path (meetups.json /scenes/3/rrule).

CodeSeverityWhen
calendar-starterrorneither start nor date, or both; end and duration together
calendar-date-ordererrorend before start (or before date)
calendar-unknown-timezoneerrora zone Intl does not know
calendar-missing-timezoneerroran event with a time in a calendar without timezone
calendar-invalid-rruleerrora rule that does not parse, UNTIL and COUNT together
calendar-overlaperrortwo occurrences overlap, only with noOverlap: true
calendar-nonexistent-timewarninga wall time that does not exist (spring forward)
calendar-ambiguous-timewarninga wall time that exists twice (fall back)
calendar-exdate-mismatchwarningan exdate that matches no occurrence
calendar-occurrences-cappedwarningthe expansion stopped at maxOccurrences

Bridges

From → toHow
roadmap → calendarinclude: in the front matter
calendar → webstoryrecit convert meetups.md --to webstory
calendar → atlasrecit convert meetups.md --to atlas

All three are owned by their target, the exception written on the Bridges page.

From a roadmap: include:

include: lists roadmaps (paths relative to the calendar, never a URL): their dated milestones become all-day events, tagged milestone, in the language of the page; with the roadmap's ics: { items: true }, its dated items too. Their ids are prefixed with the roadmap's slug (product.v1), and an undated milestone does not cross.

Markdowncourse.md
--- title: Lorem Course format: calendar lang: en timezone: Europe/Paris view: agenda include: [../roadmap-product/product.md] ---

A calendar can be made of include: only, with an empty body: calendar.recit.dev shows the releases of Récit this way, from the roadmap of Récit.

To a webstory and to an atlas

recit convert meetups.md --to webstory tells the next occurrences as an "upcoming" story: a title card, then one card per occurrence with its title, its date in the calendar's zone and language, its place and a link to its page. recit convert meetups.md --to atlas puts the events whose place has a geo on a map, an overview then one view per event ahead; an address is never geocoded. Both compile the calendar as recit build does, write Markdown by default (-o story.json for the twin) and refuse a calendar with nothing to show, with nothing written.

Places from a directory

places: ./places.md names a directory story: location=@dolor-hall then takes the name, the address and the geo of that entry, the same place on every event and in the JSON-LD.

In a site

A site publishes a calendar like any story (publish:), at /<routePrefix>/<slug>, and a page per event at /<routePrefix>/<slug>/<id>: its dates, its place, its description, its deck or film, "Subscribe" for that event alone, and its schema.org/Event JSON-LD for search engines. In an MDX page:

MDXMDX
<StoryEmbed slug="meetups" view="agenda" /> <UpcomingEvents slug="meetups" count={3} />

UpcomingEvents counts from the reader's clock once the page is loaded, so a site built on Monday does not show Monday's event as upcoming on Tuesday.

On the fullscreen pages of a site (publish.layout: "none"), the calendar's and each event's, a "Back to the site" link above the title leads to the site's home in the calendar's language; an event page keeps its own "Back to the calendar" under it. An embedded calendar has none.

A calendar opens on the month of the build day when that month has an event. Otherwise it opens on the month of the next event, or, for a calendar that only holds past events (releases, a finished season), on the month of the last one: it never opens on an empty month. ?date= in the address, and the date of the Calendar component, still choose the date shown first; "Today" goes back to the build day.

Packages

TypeScriptTypeScript
import { compileStory } from "@recit/core"; import { storyToCalendar } from "@recit/calendar"; const story = await compileStory(markdown, { file: "meetups.md" }); const { calendar, diagnostics } = storyToCalendar(story);
ImportContents
@recit/calendarstoryToCalendar, expandEvents, calendarIcs, roadmapCalendarEvents, the model
@recit/calendar/componentsthe views (Calendar, MonthView, AgendaList, EventCard…) and calendarStrings
@recit/calendar/runtimemountCalendar, the page of recit dev and recit build
@recit/calendar/styles.cssthe stylesheet of the views
@recit/calendar/nodeincludedRoadmaps, calendarPlaces: the joins with a roadmap and a directory (Node)
@recit/timethe wall times, zones and recurrences the calendar and the roadmap share
@recit/time/calendarthe calendar model (Calendar, CalendarEvent, Occurrence), re-exported by @recit/calendar

Joins in Node

@recit/calendar/node holds the two joins of a calendar, includedRoadmaps (the dated milestones of the roadmaps of include:) and calendarPlaces (the places of its places directory). The calendar depends on neither format: the caller reads them. A roadmap reader, with public names only (the one of recit build is not exported):

TypeScriptTypeScript
import { includedRoadmaps, type ReadRoadmap } from "@recit/calendar/node"; import { loadStory } from "@recit/cli"; import { compileStory, hasErrors, resolveRoadmapSettings } from "@recit/core"; import { roadmapSettings, storyToRoadmap } from "@recit/roadmap"; const readRoadmap: ReadRoadmap = async (file, { locale, today }) => { const loaded = loadStory(file, locale ? { locale } : {}); const story = await compileStory(loaded.input, { syntax: loaded.syntax, file: loaded.file }); const { roadmap, diagnostics } = await storyToRoadmap(story, today ? { today } : {}); if (hasErrors(diagnostics)) return { ok: false, diagnostics }; return { ok: true, roadmap, items: resolveRoadmapSettings(roadmapSettings(story)).ics.items, watchFiles: loaded.paths, }; }; // `meetups` is the compiled calendar story: its front matter names the roadmaps const { events, diagnostics } = await includedRoadmaps("meetups.md", meetups, { readRoadmap });

calendarPlaces(file, places, { loadStory, directoryPlaces }) takes loadStory of @recit/cli and directoryPlaces of @recit/directory. The reader is tested as written.

MCP

describe_format explains the format, validate_story checks a calendar, and expand_events gives the occurrences of a story in a window and a zone, so that an agent checks a rule before it writes it. The guide is recit://guide/calendar.