Hugo.io and my website

Posted on Mar 5, 2022

What is Hugo.io?

Hugo.io is “the world’s fastest framework for building websites.”

The power of Hugo is templating. For the non-technical, you can download popular templates, fill out the configuration and data, and quickly have a website ready to go.

For the technical, Hugo allows the creation of templates using partials and shortcodes to provide a streamlined way to keep your data separate from your view.

I created hunter as a theme for Hugo. My plan is to allow others to utilize my theme eventually, but there are a few issues that I need to sort out first.

  1. Hugo works primarily by importing .json and markdown files into html templates. I’m a bit of a perfectionist, so some of my templates are really specific to my data. Because of that, I’m unsure how helpful my hunter template would be to the non-technical.
  2. I’d have to branch my template off. This site frequently changes color palettes and layouts as my UI preferences grow. My constant changes would probably be ill-received by users if they don’t set up their stack correctly. I’d also probably have to manage user pull-requests along with my own site.
  3. There are a lot of templates out there, so I’m not sure there is a real need for mine to be published, unless people ask for it.

If someone wants access to my hugo template, I’m more than happy to share what I have. Just reach out to me and I’ll send you my whole site.

Deployment

I utilize gitlab pages to host this site for free. Below I’ve included my pipeline configuration.

image: registry.gitlab.com/pages/hugo/hugo_extended:latest

variables:
  GIT_SUBMODULE_STRATEGY: recursive

pages:
  script:
  - hugo --minify && gzip -k -9 $(find public -type f)
  artifacts:
    paths:
    - public
  only:
  - master

What if you get tired of using hugo?

Hugo generates the /public directory that gets deployed to gitlab’s server. The delivered folder here is pretty straightforward, so if I decided to go raw html/css/js on my site, I could still use my current site as a jumping off point.

You’re a web developer - why not use Angular, or React?

It’s true, I have a lot more experience using Angular and React than I do Hugo, but I’m always looking to stay on top of new and exciting tech. Hugo fit all of my requirements, and it worked really well with my free gitlab pages hosting. As I elaborate in my technologies - I always strive to use the “right tool for the right solution.” Tackling complexity is the #1 job of a software dev, and in this case, Hugo was the simplest possible framework for the job with enough power and flexibility that I felt it was future-proof enough.

Other packages I use for mhuntermartin.com

Share Tweet