sbruder / spectral

Port of html5up’s spectral theme to hugo
Other
75 stars 46 forks source link

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

Open RackReaver opened 1 year ago

RackReaver commented 1 year ago

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.

Isaacium commented 1 year ago
  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
martindonat commented 1 year ago

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

mansoorbarri commented 10 months ago

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