Calendars (ical, xcal & co)

I’m working on an organization (LUG) website and I’ve thought it would be cool to be able to provide a calendar in xcal, ical and other formats.
I would have implemented it as YAML files in /data and a template to be filled out.
I’ve tryied but I’ve not been able to figure out how to do so.
Is this possible? If yes, what could be the right way to implement it?

1 Like

Without answering for ALL “other formats” both xcal an ical should be possible to model in YAML and rendered in a Go template, BUT:

  • The mime-/content-types in Hugo is currently HTML and XML (for the RSS feed).
  • There is no text/calendar support

I agree that it would be really cool to combine a template with some data and produce the markup in any format. I guess we will get there, eventually.

@spf13 may have some ideas here.


Thanks :slight_smile:

I really hope it will be possible soon.
As far as I understand, xcal should be possible since is an xml, isn’t it?

I’m afraid it’s not that simple. The XML support in Hugo is very RSS connected.

There are some missing pieces to get where you want – but it shouldn’t be too hard.

I’ll check to see if we have a related issue on GitHub - if not, create it.