Skip to content

Commit

Permalink
Output conference dates as iCalendar file
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Jul 24, 2015
1 parent 7da36e2 commit 67f30ac
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
@@ -1,3 +1,4 @@
timezone: "UTC"
markdown: kramdown

collections:
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Expand Up @@ -27,7 +27,7 @@ <h3 class="text-muted">Android Conferences</h3>
{{ content }}

<footer class="footer">
<p><a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a> &middot; <a href="https://github.com/AndroidStudyGroup/conferences/">GitHub</a></p>
<p><a href="conferences.ics">iCalendar</a> &middot; <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a> &middot; <a href="https://github.com/AndroidStudyGroup/conferences/">GitHub</a></p>
</footer>
</div>
</body>
Expand Down
20 changes: 20 additions & 0 deletions conferences.ics
@@ -0,0 +1,20 @@
---
layout: none
uid_prefix: https://github.com/androidstudygroup/conferences/tree/gh-pages/
---
BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://androidstudygroup.github.io/conferences/
METHOD:PUBLISH
{% for conference in site.conferences %}BEGIN:VEVENT
UID:{{ page.uid_prefix }}{{ conference.relative_path }}
URL:{{ conference.website }}
DESCRIPTION:{{ conference.website }}{% if conference.location %}
LOCATION:{{ conference.location }}{% endif %}
SUMMARY:{{ conference.name }}{% if conference.location %} ({{ conference.location }}){% endif %}
CLASS:PUBLIC
DTSTART;VALUE=DATE:{{ conference.date_start | date: "%Y%m%d" }}
DTEND;VALUE=DATE:{{ conference.date_end | date: "%Y%m%d" }}
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%S" }}Z
END:VEVENT
{% endfor %}END:VCALENDAR

0 comments on commit 67f30ac

Please sign in to comment.