Skip to content

Commit 4af16fc

Browse files
escowlesphette23
authored andcommitted
code review
1 parent aa14ab9 commit 4af16fc

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

_includes/calendar-day.ics

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{% for event in include.events %}
2+
{% assign times = event.time | remove: ":" | split: "-" %}
3+
{% if times[0] and times[1] %}
24
BEGIN:VEVENT
3-
SUMMARY:{{ event.title }}
5+
SUMMARY:{{ event.title }} (Code4Lib {{ site.data.conf.year }})
46
{% if event.groupId %}
57
{% assign talks = site.posts | where: "group", event.groupId | sort: "spot" %}
68
{%- capture desc -%}
@@ -18,9 +20,9 @@ DESCRIPTION: {{ desc | strip }}\n\n
1820
{% if event.link %}
1921
DESCRIPTION: {{event.button_label}}\n {{event.link}}
2022
{% endif %}
21-
{% assign times = event.time | remove: ":" | split: "-" %}
2223
DTSTART;TZID=America/New_York:{{include.date}}T{{times[0]}}00
2324
DTEND;TZID=America/New_York:{{include.date}}T{{times[1]}}00
2425
{% comment %}LOCATION:http://example.org/TODO{% endcomment %}
2526
END:VEVENT
27+
{% endif %}
2628
{% endfor %}

_includes/calendar.ics

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
BEGIN:VCALENDAR
22
CALSCALE:GREGORIAN
33
VERSION:2.0
4-
X-WR-CALNAME:code4lib {{ site.data.year }}
4+
{% if include.livestream %}
5+
{% assign ver = "livestream" %}
6+
{% else %}
7+
{% assign ver = "in-person" %}
8+
{% endif %}
9+
X-WR-CALNAME:Code4Lib {{ site.data.conf.year }} {{ ver }}
510
{% assign day1_date = site.data.conf.days[1].date-data | date: "%Y%m%d" %}
611
{% assign day1_events = site.data.schedule | where: "day1", true | where: "livestream", include.livestream %}
712
{% include calendar-day.ics date=day1_date events=day1_events %}

0 commit comments

Comments
 (0)