How to use customization to a Hugo theme?

I deploy my site with the Netlify app from a GitLab repo. I use Hugo and the hugo-notepadium theme.

  • My GitLab repo has a link to another person’s repo that contains the files that define that theme.
  • I would like to keep using the same theme, but with a couple small changes to a CSS file.
  • To use this edited CSS file in place of the default one, must my repo contain all of the theme’s files?

Hey Joe!

It sounds right. If you’ve forked their repo, you can edit the CSS that they’ve provided, no? You won’t need to create a new file, just edit the current one.

You may wish to reach out to the theme author for more specific instructions!

@Pieparker: Thank you for writing.

I am not certain that I know enough to digest all of what you implied.

  • On my own machine, I made a tiny change to a CSS file in the theme directory.
  • The theme directory in my GitLab repo is empty except for a link to
  • My edit is so small that I was wondering if there is a command/setting that would allow me to have my repo point to cntrump’s repo but substitute my edited file for the original one.

Basically, I am hoping (perhaps unrealistically) to keep the size of my repo to a minimum. I would like to have

  1. only the edited CSS file in my repo’s theme directory
  2. a command/setting that says, “except for this CSS file, use what is found in cntrump’s theme repo”.

Hey @JoeMack,

Not going to be possible, I’m afraid. You have to provide auth to the repo you’re building from, first and foremost.

@Pieparker: That makes complete sense. The more I read my list of hopes, the less realistic they seemed.

Let me make sure that I understand the path forward. Will I succeed by putting my copy of the theme directory (the directory residing on my box at home), including my edited CSS file, into the corresponding directory in my GitLab repo? What else must I do?

Whatever files you’d like to use for your build, make sure they’re in a connected repo. It’s as simple as that :smiley: