20.6 When to Fork vs When to Override

Right, let’s settle this. The eternal question: do you fork the whole theme, or just override the bits you hate? This isn’t some philosophical debate; it’s a practical one with massive implications for your future sanity. Get it wrong, and you’ll be that developer cursing their past self during every update. Let’s make sure that’s not you. The core principle is simple, almost stupidly so: Your goal is to write as little code as possible. Every line you write is a line you own, a line you must maintain, debug, and potentially break. The theme’s code is maintained by its authors. Leverage that work. Your job is to surgically alter it, not reinvent the wheel with a uglier, more bespoke wheel.

20.5 Theme Component Stacking: Multiple Themes

Right, so you’ve got a theme. Maybe it’s a nice, sensible one from the community. But now you want to change something. A button color here, a font there. Your first instinct might be to crack open the theme’s source files and start hacking away. Please, for the love of all that is maintainable, don’t do that. You’ll create a “snowflake” project that can never be updated again without your customizations shattering into a million pieces.

20.4 Overriding Theme Static Files and Partials

Right, so you’ve decided the theme’s default look isn’t going to cut it. Good for you. We’re past simple CSS tweaks and into the real surgery: overriding the actual theme files themselves. This is where you stop asking politely and start telling the framework what to do. It’s powerful, it’s necessary, and if you do it wrong, you’ll create a maintenance nightmare that will haunt your future self. Let’s do it properly.

20.3 Overriding Theme Templates: Precedence of layouts/ Over Themes

Right, so you’ve decided to bend the theme to your will. Excellent. This is where you stop merely using a theme and start making it truly yours. But with great power comes a somewhat confusing set of rules about what file takes precedence over what. The system is logical once you understand it, but the designers, in their infinite wisdom, decided that a simple numbered list was too straightforward. We navigate by pathnames instead.

20.2 Configuring a Theme via params

Right, so you’ve picked a theme. Good for you. It probably looks… fine. Perfectly adequate. But you’re not here for ‘adequate,’ you’re here to make it yours. That’s where params.toml (or params.yaml or params.json—I don’t judge, but TOML is the default for a reason) comes in. Think of this file as the single source of truth for all the knobs, levers, and slightly confusing dials your theme exposes for you to tweak without having to write a single line of CSS. It’s the control panel.

20.1 Installing a Theme: git submodule, Hugo Module, or Manual

Right, let’s get this theme onto your machine. This isn’t like picking a new wallpaper; it’s more like a organ transplant for your site. We have three main ways to do it, and your choice here is the first major decision that will either set you up for smooth sailing or haunt you for months. I’ll be honest: the “best” method isn’t always obvious, and the Hugo docs can make it seem like they’re all equally valid. They are not. Let’s break them down.

— joke —

...