Skip to content

Commit 24e9b91

Browse files
committed
[ post ] Why I am making my own theme
Very rambly, but hey ho.
1 parent fbe31e2 commit 24e9b91

File tree

1 file changed

+107
-0
lines changed
  • content/en/post/creating-my-own-hugo-theme

1 file changed

+107
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
# Documentation: https://docs.hugoblox.com/managing-content/
3+
4+
title: "Creating My Own Hugo Theme"
5+
subtitle: ""
6+
summary: ""
7+
authors: [thomas-e-hansen]
8+
tags: [hugo,website,gardening,meta]
9+
categories: [sapling]
10+
date: 2025-05-08
11+
lastmod:
12+
featured: false
13+
draft: false
14+
15+
# Featured image
16+
# To use, add an image named `featured.jpg/png` to your page's folder.
17+
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
18+
image:
19+
caption: ""
20+
focal_point: ""
21+
preview_only: false
22+
23+
# Projects (optional).
24+
# Associate this post with one or more of your projects.
25+
# Simply enter your project's folder or file name without extension.
26+
# E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
27+
# Otherwise, set `projects = []`.
28+
projects: []
29+
---
30+
31+
When I originally set up this website during the COVID-19 pandemic, I decided to
32+
use the "Academic" theme from Hugo Blox (or ~~Wowchemy~~ Hugo Academic, as it
33+
was known back then). It was a tiny bit of a pain to get self-hosted, rather
34+
than through their solutions via Netlify, but it was manageable and I loved the
35+
colour themes, the multi-language support (because I vastly overestimated my
36+
amount of free time), and that the themes were both desktop- and
37+
mobile-friendly. However, a consistent pattern with Hugo Blox -- other constantly
38+
changing the org's name, don't know what's up with that -- has been that
39+
updating the theme to its latest version is a chore.
40+
41+
"But surely you don't need to update the theme? If it ain't broke, don't fix
42+
it." -- I mean, you're not wrong. But Hugo still seems to be moving quite fast,
43+
so occasionally things break, and then I'd like my site to build again. And
44+
also, I think not updating my website's theme just also goes against whatever
45+
same ~~masochistic~~ naturally curious tendencies that have me running a rolling
46+
distro as my daily driver; for better and for worse, I like being on the
47+
bleeding edge.
48+
49+
And that is kind of the crux of it: I'm not annoyed that things break between
50+
updates, that can happen for even the best software, no I'm annoyed that every
51+
time the site theme breaks, it breaks:
52+
* in a new way, which depends on Hugo, or the theme, or both;
53+
* the structure of the theme, changing what specific directories for different
54+
content types are called;
55+
* the theme itself, completely removing colours or features which the theme
56+
itself originally used.
57+
58+
If it were just that the theme needed patching every time, that would be fine.
59+
But having an effectively novel code base to learn every update is incredibly
60+
tiresome, and I want out. As I said at the start of this post, I'm already going
61+
against the intended use of the theme by self-hosting it, Geo Cushen -- the
62+
creator behind ~~Hugo Academic~~ ~~Wowchemy~~ Hugo Blox -- seems to be running
63+
it in a SaaS direction, with self-hosting being possible thanks to the whole
64+
thing being open source (which is _amazingly generous_ by the way) but not
65+
officially being supported (the documentation for doing so is sparse and usually
66+
a bit behind the current version). Which is _completely fair_, the guy needs to
67+
make a living, nobody is forcing him to make _several_, in my opinion, great
68+
Hugo themes, much less to open-source theme. I am very grateful for the use I've
69+
gotten out of this, but I'm not interested in running my own site via a
70+
third-party, zero-code solution, and that is the primary focus of Hugo Blox. So,
71+
fair cop, I will have to move to something else.
72+
73+
By far the easiest option would be to find another theme, but I've had a look at
74+
other themes, and none of them really match what I want my website to be: my own
75+
little place on the Internet to put and manage my thoughts, projects, pictures,
76+
whatever, without any algorithm or data mining overlords baked in. Some themes
77+
are too minimalist or quirky, or they are effectively a web-CV. The former,
78+
whilst I appreciate the aesthetic, are a bit too far removed from
79+
"useable/intelligible to the everyday person" for my tastes; and similarly, I
80+
get why people want the latter, but in my book that's what LinkedIn and, y'know,
81+
my actual PDF-format CV are for.
82+
83+
So the only option seems to be to write my own. This way, I get something which
84+
(hopefully) looks how I would like it to, and where _I_ know the codebase,
85+
meaning I can (again, hopefully) figure out what broke, why, and how to fix it.
86+
Regardless of update-mania. It doesn't have to be pretty, it just has to work
87+
and be understandable by me (although I'm going to put it on GitHub, in case
88+
anyone else wants to use it). Up-to-date tutorials for how to create a Hugo
89+
theme seem few and far between, a downside of Hugo still being a relatively new
90+
static site generator, but both
91+
[Tomo's "Create a Hugo Theme From Scratch"](https://tomo.dev/en/posts/create-hugo-theme-from-scratch/part-one/)
92+
and
93+
[MayADevBe's "How to create a Hugo Theme"](https://mayadevbe.me/posts/blog/hugothemecreation/)
94+
seem recent enough that things have hopefully not changed drastically.
95+
96+
Let's see how it goes!
97+
98+
-----
99+
100+
As always, thank you so much for reading! I hope this more rambly post was
101+
interesting in some way or another. And if you're reading this, given that my
102+
blog currently doesn't build at all, I guess I was successful! I intend to keep
103+
maintaining and polishing the theme over time, so maybe you're viewing this and
104+
it looks awful, or maybe the site has finally become the lush paradise I wanted
105+
it to be. Can't wait to see for myself either way, I'm sure it'll be fun and
106+
I'll learn something new : )
107+

0 commit comments

Comments
 (0)