Tailoring (!?) themes when using Hugo modules

I’m using a Module for a theme (I think of this as using a “Theme as a module” but … !?)

    path = "github.com/onweru/newsroom"

The author of the theme responded to an issue to help me understand how to tweak the theme to use a non-italic font. This involves revising assets/sass/_nav.sass.

I naively assumed I could create a local copy of this hierarchy with the revised file:

├── assets
│   └── sass
│       └── _nav.sass
├── content
│   └── posts
├── go.mod
├── go.sum
├── hugo.toml
├── public
├── resources
├── static
└── themes

But that doesn’t work.

Am I correct in thinking that the correct solution is to vendor the module for the theme and edit it in the vendored (_vendor) folder?

I’m confused in part because, to configure GoatCounter for my sites, I’ve been (verifiably) able to create layouts/_default/baseof.html and layouts/partials/analytics.html as a way to override the theme’s settings (!).

I assumed this was a general merge capability of, if the file exists in the parent (!?) site (!?) module, then it overrides module files.

Thanks in advance!

I am able to modify assets/sass/_nav.sass without vendoring the theme… works fine.

Hmmm… I must have made a mistake. I’ll try it again.

My apologies!

Yes, it worked for me too when I retried it; I don’t know what I did wrong earlier.

Sorry to have wasted your time.

Thank you!

1 Like

I realized my mistake.

I have continuous deployment that builds the site into a container.

I’d forgotten to include /assets in the set of folders copied into the Containerfile

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.