Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ical feed, publishing our events #53

Closed
BudgieInWA opened this issue Aug 16, 2023 · 10 comments
Closed

Add an ical feed, publishing our events #53

BudgieInWA opened this issue Aug 16, 2023 · 10 comments

Comments

@BudgieInWA
Copy link
Contributor

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
Copy link
Contributor Author

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

@samwilson
Copy link
Member

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 jekyll/jekyll#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
Copy link
Contributor Author

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

@samwilson
Copy link
Member

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

@BudgieInWA
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor

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

@MaiaWilliams
Copy link
Contributor

MaiaWilliams commented Nov 19, 2023 via email

@samwilson
Copy link
Member

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
Copy link
Contributor Author

Linked from /events.html in #60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants