Streamlining Calendar Feeds: Unified Data Source Powers ICS and JSON Integration
June 14, 2026
A zero-infla trick uses URL-based deeplinks for adding events to Google Calendar and similar Outlook actions, avoiding file-based steps for certain interactions.
Hosting with proper MIME types is essential on static hosts; a Cloudflare Pages headers file ensures ICS is served as text/calendar while JSON API files use application/json.
The piece highlights RFC 5545 pitfalls, including all-day event handling where DTEND is exclusive, CRLF line endings, 75-byte line folding for long lines, and proper escaping of text content, accompanied by a folding function to respect byte-length constraints.
Localization is treated as a craft: each locale uses hand-crafted strings to avoid duplication and maintain correctness across languages.
The article provides concrete examples, user-facing details, and practical code for line folding, UID stability, and URL-based event creation, culminating in actionable takeaways and an invitation for questions.
The author explains shipping a subscribable calendar-feeds feature for a static site without a backend by emitting ICS and JSON files during the build, maintaining a single source of truth between site data and feeds.
During build, the emitter traverses holiday data to generate ICS feeds (per-year, per-holiday, and all-years) and accompanying JSON API feeds, writing them to the output folder.
The project centers on a single, authoritative data source—holiday JSON—that feeds the UI, ICS feeds, and the API to prevent drift, with concrete live URLs for Calendana and clear examples of feed JSON and ICS outputs.
Summary based on 1 source
Get a daily email with more Tech stories
Source

DEV Community • Jun 14, 2026
Generating valid .ics calendar feeds at build time