Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single method to override theme's colors #43

Open
sn0ot opened this issue Dec 23, 2020 · 4 comments
Open

Single method to override theme's colors #43

sn0ot opened this issue Dec 23, 2020 · 4 comments

Comments

@sn0ot
Copy link

sn0ot commented Dec 23, 2020

Hiya @EmielH, many thanks for porting this theme to hugo and having it well organized!

Is there a single method to override the theme's colors in the tale/assets/tale/*.scss files or do they have to be painfully iterated manually?

I see hugo has mechanisms to override layout rules via Hugo's Lookup order and was wondering if this theme allows for any similar mechanism for colors.

If not, I'll happily implement a way that will, at minimum, let users define a dark and light theme and let them further extend it to any custom color theme.

BTW I don't actually know hugo or frontend development but the way you laid everything out is so easy to follow. This would be a good "first issue" to get familiar if there is no existing way implemented yet.

@EmielH
Copy link
Owner

EmielH commented Dec 23, 2020

Hi @sn0ot, thanks for your kind comments!

All colours are defined in _variables.scss (and in _syntax.scss if you plan on showing syntax highlighting for code) so that's the only place that you should need to override them. All other files refer to colours defined in these files.

So if you create a _variables.scss for your own site and redefine the colours over there, Hugo should use those instead of the theme's standard colours. You can copy the file that comes with the theme so you can be sure you're defining all variables.

The theme currently doesn't have a way to define different colour themes through configuration. I'd be happy to accept a PR for this kind of functionality!

@sn0ot
Copy link
Author

sn0ot commented Dec 24, 2020

Thank you for the explanation!

I'll give it a shot over holiday :)

@sn0ot
Copy link
Author

sn0ot commented Dec 29, 2020

Hi @EmielH, I have a question about the _syntax.scss for syntax highlighting. Any changes I make to _syntax.scss do not get reflected in the built site for my code snippets. I followed hugo's syntax highlighting reference and even created another syntax file with hugo gen chromastyles --style=monokai > _syntax.scss and replaces .chroma with .highlight. Any clue what is preventing me from changing the syntax colors?

@EmielH
Copy link
Owner

EmielH commented Jan 3, 2021

Apologies for the late reply, I didn't have access to a computer over the holidays. I'll look into your questions and pull request as soon as possible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants