Yearly archives in GoHugo

Internet

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:

taxonomies:
  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

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

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

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!