Marking up Events with Microformats

As I called out in Homebrew Website Club: Nottingham, Session 1, I wanted to have Microformats automagically generated for the content.

This was because I had manually hand-crafted this h-event for the last event, which although perfectly fine was a bit more work than I'd want to do in the future, as well as duplicating a lot of the basics of the markup across many events.

However, before I did this, I needed to have a new content type in Hugo for these events, so I could render them differently than blog posts / content pages. This is as simple as creating a new folder in Hugo's directory structure, which is really nice, and then adding the relevant templates in my theme to render the h-events.

The largest piece of work for this (as with the work for h-entrys) was getting HTML-Proofer checks in place to verify that the content is well-formed and that I don't have regressions in the future.

This is very exciting for better interoperability with others!

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.



Other posts you may be interested in:

Interactions with this post

This post has had 1 WebMention interactions, as of Tue, 23 Apr 2019 22:18:12 +0100.

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