feat: migrate events to Google Calendar API#1511
Draft
BekahHW wants to merge 4 commits into
Draft
Conversation
👷 Deploy Preview for virtual-coffee-io processing.
|
Refactor event data structures and add Google Calendar event fetching functionality.
e2f6380 to
9e3a7ab
Compare
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the Craft CMS / Solspace Calendar GraphQL data source for events with the Google Calendar API.
Why
Part of the migration off Craft CMS. Events were the last piece of data being fetched from Craft at build time. This removes that dependency entirely.
How
src/data/events.tsto fetch events from Google Calendar API using two new env vars:GOOGLE_CALENDAR— API key (already added to Netlify)GOOGLE_CALENDAR_IDS— comma-separated list of calendar IDs (already added to Netlify)EventItemshape the events page already expects:summary→titlestart.dateTime→startDateLocalizedend.dateTime→endDateLocalizeddescription→eventCalendarDescription(sanitized)locationfield (where Zoom links live) — keeps member-only join links privategraphql-request,CMS_URL, andCMS_TOKENusage from this fileAfter merge
CMS_URLandCMS_TOKENfrom Netlify env vars (once both this and the podcast PR are merged)graphql-requestfrom package.json if no other files use it