Yearly archives in GoHugo


You can now browse posts here by year again, which is kinda cool. The links are now in the sidebar and archive pages. For those reading this via RSS, these are the browsable years:

2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004

I wish I did some tricked out Go to make this possible, but I just created a year taxonomy in Hugo. In my config.yaml, which I use instead of TOML, like a gentleman:

  category: "category"
  tag: "tag"
  year: "year"

And in the frontmatter for typical blog posts:

title: "Yearly archives in GoHugo"
date:  "2018-01-07T10:51:23+11:00"
year:  "2018"

The illustrious Edgar F. Codd and Raymond F. Boyce would scoff at this, but works and is very fast.

Which reminds me, consider this another shameless plug for Hugo. I loved using Jekyll, but it took forever to parse and generate thousands of posts. Hugo is orders of magnitude faster; this is not an exaggeration! Also, if you haven’t tried static site generation for your blog, please do.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.