Ian S. McBride

Software Engineer


Smigle a Minimalist Blog Theme for Hugo

The site you’re now reading was built with smigle, a publicly shared blog theme I created from scratch for the Hugo static site generator. If you’re dissastified with Hugo’s official collection of themes (currently it contains 403 themes) and want a blog that exactly meets your needs, I recommend building your own theme. It’s a short, straight-forward process, and my hope is that from reading about my experience building smigle, which took only one two-week sprint, you’ll decide to build your own theme too.

Read more...

Handle Last Element Differently When Looping In Hugo

When building smigle, the Hugo theme for this site, I was looping over an array and outputting both the current element and some delimiter text, but I couldn’t figure out how to handle the last element differently from the rest so as to avoid the unwanted trailing delimiter. In this post, I cover the solutions I found for this delimiter issue. Hopefully, this short read saves you from the misery I went through while hunting for advice on Stack Overflow and Discourse.

Read more...
1 of 1