Adding iCalendar Feeds for Events in Hugo

Featured image for sharing metadata for article

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's profile image 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.

#announcement #events #www.jvt.me #hugo.

Also on: IndieWebCamp logo IndieWeb.xyz logo

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

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

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.