geogeeks-au / geogeeks-au.github.io

The Geogeeks website.
https://geogeeks.org/
Apache License 2.0
3 stars 3 forks source link

Add an ical feed, publishing our events #53

Closed BudgieInWA closed 11 months ago

BudgieInWA commented 1 year ago

Because we have the source of truth for all our events stored as individual pages here, we should be able to add an ical feed that people can subscribe to in their calendars. The feed is just a single text file in the (awkward) ical format, so it might be as easy as dropping in a single file for Jekyll to render. Here is an example of just that: https://github.com/ct-martin/fossrit.github.io/blob/master/feeds/calendar.ics

BudgieInWA commented 1 year ago

This article might provide good troubleshooting details: https://sparrow0hawk.github.io/jekyll-calendar/

samwilson commented 1 year ago

In #56 I've started the process of switching to a uniform date/time format.

There seems to be an issue with storing the times in UTC though (see https://github.com/jekyll/jekyll/issues/6033 and linked issues), so it looks like we need to store them in AWST (and set timezone in the config file, which I've done in the above PR). I'm not 100% that will do everything we need for icalendar though, where we need to be able to calculate UTC (I'm hoping something like DTSTART:{{ page.start_time|date:"%s"|minus:28800|date:"%Y%m%dT%H%M%SZ"}} will do it, i.e. subtracting 8 hours from the Unix timestamp).

BudgieInWA commented 1 year ago

For iCalendar, we should use a 'DATE WITH LOCAL TIME AND TIME ZONE REFERENCE' like the example DTSTART;TZID=America/New_York:19970714T133000.

samwilson commented 1 year ago

Ah that's better isn't it, then we don't have to convert the times at all but just reformat.

BudgieInWA commented 12 months ago

An .ics file has been deployed and working so far! I have my Google Calendar subscribed to it, and the events have come through perfectly. @samwilson thanks for setting start_time and end_time for all the events :)

@samwilson, @MaiaWilliams, @johnwbryant can you please test in any different calendar systems that you have? https://geogeeks.org/geogeeks.ics

Once it has been tested a bit, we can add links to the site.

BudgieInWA commented 12 months ago

BTW, I have ignored the suggestion that we "SHOULD" wrap lines at 75 octets, so we don't have to do any of the line-folding shenanigans. The validator also complains that the TZID /Australia/Perth is not described in the file by a VTIMEZONE entry, but starting the value with a slash tells clients that the id that follows is from an (unspecified) standard timezone database, so I'm pretty sure it will work everywhere.

johnwbryant commented 12 months ago

Just tried it in Google Calendar, imported 28 events. Seems to work?

MaiaWilliams commented 12 months ago

Works for me too :)

-------- Original Message -------- From: John Bryant @.> Sent: 19 November 2023 11:24:31 am AWST To: "geogeeks-au/geogeeks-au.github.io" @.> Cc: MaiaWilliams @.>, Mention @.> Subject: Re: [geogeeks-au/geogeeks-au.github.io] Add an ical feed, publishing our events (Issue #53)

Just tried it in Google Calendar, imported 28 events. Seems to work?

-- Reply to this email directly or view it on GitHub: https://github.com/geogeeks-au/geogeeks-au.github.io/issues/53#issuecomment-1817732444 You are receiving this because you were mentioned.

Message ID: @.***>

samwilson commented 12 months ago

Looks great!

The URL field is not fully-qualified though, e.g.:

URL:/2023/1008_osm-beckenham.html

Everything else works great, and as I was already subscribed to /geogeeks.ics it all came through without me having to change anything (although I suspect I'm the only one who was already subscribed, from back in the day).

Screenshot_20231120_062541

BudgieInWA commented 11 months ago

Linked from /events.html in #60.