NOLA-musicians-4-Palestine / nm4p_website

New Orleans Musicians for Palestine website
GNU General Public License v3.0
0 stars 1 forks source link

sync website calendar to org google calendar #1

Open beatboxchad opened 1 week ago

beatboxchad commented 1 week ago

This feature uses OAuth to fetch and render events from a connected Google Calendar on the "Events" page.

It allows the administrator to configure which calendars to render events from (including calendars shared with the connected Google account). It renders the description found in the event description, and uses the first image attachment to the event as the flier.

beatboxchad commented 1 week ago

Architecture notes

Github Pages is static site. No server-side code. Client side code is both wasteful and it's hard to publish the security key. A CI job that packs the events into the static site at deploy works best. Github's CI platform offers container execution, secret storage, and both triggered and scheduled jobs. This allows us to sync the calendar any time the site deploys, and on a schedule.

Container execution provides the ability to use any given developer's preferred language or stack, and this feature is initially drafted in Python. The script fetches all future events and their attached media files from Google, renders the events into the appropriate Jekyll templates, and packs them into the build artifact. It uses the "No More Events" page as a default template. It cleans up past events.