Skip to content

Fix Calendar #202

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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ url: "https://fossrit.github.io"
social:
irc: https://web.libera.chat/#rit-foss

# --- calendar feed settings ---
calendar_feed:
url: "https://fossrit.github.io/feeds/calendar.ics"
description: "Upcoming FOSS@RIT events in iCalendar format"
timezone: "America/New_York"

Comment on lines +37 to +42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these settings associated with a particular jekyll plugin? They dont seem to be referred to in the calendar.ics file and i dont see any similarly named plugins in Gemfile or _config.yaml that would indicate what these parameters are doing.

# --- events page settings ---

page_events:
Expand Down
27 changes: 12 additions & 15 deletions feeds/calendar.ics
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@ layout: none
---
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//{{site.title}}//{{site.url}}//EN
PRODID:-//{{ site.title }}//{{ site.url }}//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH{% for post in site.posts %}{% if post.categories.last == "meetings-meetups" or post.categories.first == "events" or post.categories.first == "talks" or post.categories.first == "announcements" and post.layout == "post-event" %}
BEGIN:VEVENT
UID:{{site.url}}{{site.baseurl}}{{post.url}}
DTSTAMP:{{ post.date | date: "%Y%m%dT000000Z" }}{% if post.date-start %}
DTSTART;TZID=America/New_York:{{ post.date-start | date: "%Y%m%dT%H%M00" }}{% else %}
UID:{{ site.url }}{{ site.baseurl }}{{ post.url | replace: '/', '-' }}
DTSTAMP:{{ post.date | date: "%Y%m%dT%H%M%SZ" }}{% if post.date-start %}
DTSTART;TZID=America/New_York:{{ post.date-start | date: "%Y%m%dT%H%M%S" }}{% else %}
DTSTART:{{ post.date | date: "%Y%m%d" }}{% endif %}{% if post.date-end %}
DTEND;TZID=America/New_York:{{ post.date-end | date: "%Y%m%dT%H%M00" }}{% else %}
DTEND;TZID=America/New_York:{{ post.date-end | date: "%Y%m%dT%H%M%S" }}{% else %}
DTEND:{{ post.date | date: "%Y%m%d" }}{% endif %}{% if post.rrule %}
RRULE:{{post.rrule}}{% endif %}
ORGANIZER;CN="{{site.title}}":MAILTO:{{site.email}}
SUMMARY:{{post.title}}
DESCRIPTION:{{post.excerpt | strip_html | newline_to_br | replace: "<br />", " " | strip_newlines | strip}}
RRULE:{{ post.rrule | strip_newlines }}{% endif %}
ORGANIZER;CN="{{ site.title }}":MAILTO:{{ site.email }}
SUMMARY:{{ post.title | escape }}
DESCRIPTION:{{ post.excerpt | strip_html | newline_to_br | replace: "<br />", " " | strip_newlines | escape }}
CLASS:PUBLIC{% if post.location %}
LOCATION:{{post.location}}{% endif %}{% if post.redirect %}
URL:{{post.redirect}}{% elsif post.categories.last != "meetings-meetups" %}
URL:{{site.url}}{{site.baseurl}}{{post.url}}{% else %}
URL:{{site.url}}{{site.baseurl}}/get-involved{% endif %}{% if post.categories.last == "meetings-meetups" %}
Comment on lines -22 to -24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why these variations on the URL were removed? The warnings from the RFC checker were mostly timezone and line length related, so I'm not seeing a reason to change this

CATEGORIES:{{site.title-abbrev}},{{site.title}},{{post.categories.last | upcase}}{% else %}
CATEGORIES:{{site.title-abbrev}},{{site.title}},{{post.categories.first | upcase}}{% endif %}
Comment on lines -25 to -26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here - Is there a reason these lines were changed?

LOCATION:{{ post.location | escape }}{% endif %}
URL:{{ site.url }}{{ site.baseurl }}{{ post.url }}
CATEGORIES:{{ site.title-abbrev }},{{ site.title }},{{ post.categories.first | upcase }}
END:VEVENT{% endif %}{% endfor %}
END:VCALENDAR