diff --git a/_config.yml b/_config.yml
index 5938901..b4bc620 100644
--- a/_config.yml
+++ b/_config.yml
@@ -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"
+
# --- events page settings ---
page_events:
diff --git a/feeds/calendar.ics b/feeds/calendar.ics
index 27c26ab..bac0b6b 100644
--- a/feeds/calendar.ics
+++ b/feeds/calendar.ics
@@ -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: "
", " " | 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: "
", " " | 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" %}
-CATEGORIES:{{site.title-abbrev}},{{site.title}},{{post.categories.last | upcase}}{% else %}
-CATEGORIES:{{site.title-abbrev}},{{site.title}},{{post.categories.first | upcase}}{% endif %}
+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