Framework for customizing themes


#1

Hello,

I’m moving from python-powered static-site-generator wondering what is recommended way to customize Hugo themes?

Here I’m thinking about several things:

  1. simple overrides like changing some CSS styles which is at the moment deployed in some themes (e.g. Hugo Octopress by using params:
    [params] customCSS = ["css/custom.css","css/custom2.css"]

  2. more extensive customization by changing/adding/deleting layouts in the provided theme

  3. taking advantage of theme’s CSS framework (e.g. Bootstrap etc.) to modify/customize theme.

First use case could be (easily) covered if every author would provide appropriate partial template and checking for e.g. customCSS parameter within it.

By looking at the docs it seems that 2nd use case is covered very well by it.

3rd use is momentarily solely depended on the theme’s author and/or the CSS framework used by the theme…

So, I’m thinking if it would be feasible/possible to create some kind of ‘theme-customzing-framework’ which could integrate or standardize the current practice of solving the problem of customizing Hugo themes?

So far, I’ve only briefly skimmed through the presentation about Hugo’s future and it really looks great.

Do I possibly miss something which is already present in Hugo helping solving this issue?


#2

You can read this page which documents the process of customizing themes :wink:

In a nutshell, Hugo allows you to override the theme files without editing or deleting them. That way, you can customize your theme without touching the theme itself :slightly_smiling:


#3

Believe me, I read it, but it didn’t ‘click’ before. :frowning:

[quote]In a nutshell, Hugo allows you to override the theme files without editing or deleting them. That way, you can customize your theme without touching the theme itself :slightly_smiling:
[/quote]

Now it’s pretty clear. :slightly_smiling:
Btw, the new docs site looks much better, imho. :wink:


#4

It didn’t “click” for me the first time too, but once I had a good look, it did :smile:


#5

That presentation was from early 2016… I gotta imagine most if not all of that stuff has been integrated by now, no?