Repository navigation
fix(events): make the ICS feed work as a subscription - #1
Merged
Merged
Conversation
Give each event a UID derived from its file name, so subscribed calendars stop seeing every event as new at each build. Add refresh hints to the calendar header, switch the page link to webcal:// and explain how to subscribe.
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.
Description
People who subscribe to
hpcmaths_seminars.icsmay not get new seminars.ics_generator.pylet theicslibrary pick a randomUIDfor each event, so all 76UIDs changed at every build. Subscribed clients can treat every event as new, or duplicate it. TheUIDis now the.rstfile name plus the site domain, for example2022-05-05-matalon@hpc-maths.github.io. Event files are also sorted, so the output no longer depends on filesystem order.X-WR-CALNAME,REFRESH-INTERVALandX-PUBLISHED-TTL(6 h). Apple Calendar and Outlook honour them, Google ignores them. They sit before the first component, as RFC 5545 requires. Line endings are now CRLF.webcal://and tells readers to subscribe instead of importing the file, with the Google Agenda steps..github/workflows/pages.ymlnow triggers onmaininstead ofmaster, which is the default branch.Reviewer notes
The first deployment changes every
UIDonce. Existing subscribers may see events duplicated until they resubscribe.I checked a full build locally: the ICS parses with 76 events and 76 unique
UIDs, identical across two builds. I did not test a real calendar client.