Adding iCalendar Feeds for Events in Hugo

While running Homebrew Website Club Nottingham, I've been manually reminding the group of when the next event is.

However, this hasn't been the best because if I'm not on top of it, it means others won't see the events being posted.

I'd created an h-feed for the events, but as not everyone has support for an Indie reader, it doesn't quite make sense.

So I posted in the Slack channel we're using to talk about it, and a couple of the comments were "don't use Meetup.com" and "what about calendar invites".

However, being the super lazy person I am, I didn't want to have to create a calendar entry each and every event so I've now created an iCalendar feed, which is linked on each of the events pages to let others subscribe to that and have it handily appear in your calendar app of choice.

This was fairly straightforward easy with Hugo, as it already supports rendering iCalendar entries. To get it fully working, I had to create the ICS file in layouts/events/section.ics, and then hook it in correctly in my config.toml:

 [outputs]
-section = ["HTML", "RSS"]
+section = ["HTML", "RSS", "Calendar"]

Written by Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

Categories
Tags
Related Posts

Other posts you may be interested in:

Syndication

This post will be syndicated to these sites:

Interactions with this post

Interactions with this post

This post has had 2 WebMention interactions, as of Mon, 17 Jun 2019 20:07:02 +0100.

Have you written a response to this post? Let me know the URL: