spectral icon indicating copy to clipboard operation
spectral copied to clipboard

What is the best way to change the accent color '#21b2a6' without changing the theme code?

Open RackReaver opened this issue 2 years ago • 3 comments

I want to change this color (#21b2a6) in assets/css/main.css to align better with a non-profits branding. I don't want to alter the theme code though in case there are updates in the future.

How do you go about changing the color without changing the underlining code? There might also be a way using Hugo natively but I have not found anything in the documentation as of yet.

I can only assume I am not the only one trying to overcome this problem, hoping someone has the solution.

RackReaver avatar May 03 '23 21:05 RackReaver

  1. Create a modifications.css file and put it in the static folder.
  2. Copy and paste the relevant section from the main.css file and change the color.
  3. Change the custom_css parameter in config.toml to modifications.css image

Isaacium avatar Jul 04 '23 21:07 Isaacium

Hugo doesn't render if I do this, even if my custom.css is empty. The error message is: execute of template failed: template: partials/stylesheets.html:8:36: executing "partials/stylesheets.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource

martindonat avatar Nov 08 '23 13:11 martindonat

@martindonat, make sure your custom.css is in /assets/

mansoorbarri avatar Feb 08 '24 11:02 mansoorbarri