11/27/19 - Custom Tag Lists Hugo

Mood Accomplished icon Accomplished
Tags Web Development Hugo

I’m in such a good mood this morning. Yesterday I sorted out how to have custom tag lists in Hugo. That sounds really boring but what it means is all I have to do is add a type parameter to my posts and Hugo will understand to add it to a custom tag list that suits that particular type of content. I still have things I need to work on around here, but the workflow is slowly moving toward something that has the ease of a CMS. My ultimate goal is to be able to simply drop markdown files into a folder and Hugo sorts them all into the appropriate places.

Add the file:

content/tags/recipes/_index.md

_index.md includes a type frontmatter

type: recipes

Under layouts, add the template:
layouts/recipes/list.html