Suggestions on how to manage events? (events calendar, single event posts, organizers, multiple dates and times)

Hi!
I’ve been wrapping my head around this during the last few days, because I’m wondering how to handle events on my website/theme. The idea is also to publish this theme for free once everything is sorted out.

I need to display a full calendar with events and occasionally do some posts on some of the events.

What I’ve currently done is to create custom short-codes for the event calendar which will grab the info from a big .yaml file containing all the details of the events. But this is a bit confusing because you have to always be careful to put all the events in chronological order, to create a whole new section in the yaml, and this makes harder to manage events that have multiple dates or times. Yes you can use Collection.Sort to sort the yaml content by date, but you cannot do it with multiple dates, considering that one event can have 2 dates but another one can have 20.

The idea to use shortcodes comes from the fact that ideally when making full posts about events (which will go into the content section) one could grab events info from that single file and not having to copy paste everything again. One can do something like:

---
title: My event
---
{{< event-description name="my-event" >}}
{{< event-organizer >}}
{{< event-location >}}
etc...

Now sadly shortcodes cannot go into frontmatter so I can’t use an archetype which has title or date params to show events dates or create posts programmatically just from a yaml file without adding an external script. But I don’t care if the events post and the events calendar are two different things, it’s not essential to be able to get everything from the “database” to content, but having a good way to grab events info and to manage the calendar would be essential, also because the calendar might be often edited, while individual posts can just be made just before the event date.

I’ve seen that hugo is able to handle .ICS files as well, which I guess could be a better manageable option maybe for something like this maybe?

The events calendar yaml file contains entries like:

-
    Date1: 2025-09-25
    Date2: 
    Date3: 
    Name: MYEVENT    
    Description: "A cool event description."
    Time: 10:00 - 12:00
    Location: 
    City: MyCity
    Organizer: Michael Scott
    Phone: +00 00000 0000
    Email: email@email.dummy    
    Website:
    Image: 
-

Any suggestion on how to deal with events / events calendars in a clearer way? Is this beyond Hugo and should I rely on a dynamic websitet?

with your description there are a lot of possibilities but also a lot to be clarified:

so just some notes here

  • you should have something like a datamodel to see which objects you have and the relations in between and which are the parts that are defined at each obejct.
  • where are you maintaining the data - completely manual inn hugo or outside with an app.

what are the use cases you want to support. edit/update/shift, …

in general I would say you could create pages and link them via folder structure and/or relations

  • create a page for every event
    • eventId, eventName, …
  • create subpages or a page resource schedule. using subpages will allow to use filters based on dates without complex json handling
  • you could cascade down values like the eventId or name … to the subpages
  • use a taxonomy for the organizer

I would go with dedicated templates for the different stuff instead of using shortcodes.
so just adding another event with frontmatter will create a nice event page.
and automatically display all schedules, the organizer.

with the schedule and layout page approach, just adding a new schedule subpage will update all automatically on build time

ofc you will have to take proper handling of other stuff. What’s with events in the past when you update an event description → maybe you need versioning or an archive… maybe a layout that handles past and future events differently …

1 Like