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

Theme color customizable in config.toml #31

Closed
bb1950328 opened this issue Jan 27, 2021 · 6 comments
Closed

Theme color customizable in config.toml #31

bb1950328 opened this issue Jan 27, 2021 · 6 comments

Comments

@bb1950328
Copy link
Contributor

I want to configure the --theme variable in _variables.sass.
The problem is that the sass file isn't evaluated by hugo so it's not that easy for me with my current knowledge of hugo to do it by myself.
If somebody can point me in the right direction I can do it by myself.
I would be glad if this gets implemented soon because currently I have a second git branch just to change the color.

Thank you very much

@onweru
Copy link
Owner

onweru commented Jan 27, 2021

@bb1950328 are you running compose theme as a hugo module?

@bb1950328
Copy link
Contributor Author

Currently it's a git submodule.

@onweru
Copy link
Owner

onweru commented Jan 27, 2021

Currently it's a git submodule.

Is this submodule pointing to this repo or a fork of this repo?

@bb1950328
Copy link
Contributor Author

It's pointing to my fork:

[submodule "themes/compose"]
	path = themes/compose
	url = https://github.com/bb1950328/compose.git

I have a branch named "customize" where I changed the --theme variable to blue. I develop new features on "master" and merge it into "customize" after I committed them. If I can save the color in the web repo (BrickSimWeb in my case) I wouldn't need to do that merge every time and other users can customize the theme easier as well.

@onweru
Copy link
Owner

onweru commented Jan 27, 2021

Try:

  1. Create a assets/sass/_variables.sass file on your repo.
  2. Copy the contents of https://github.com/bb1950328/compose/blob/master/assets/sass/_variables.sass and paste into (1) above
  3. Edit the --theme variable after completing the copy-paste.

That file should act as a git trackable override. Please notice that the naming and nesting of the override file should match file you wish to override from the theme.

Let me know if you have some luck

bb1950328 added a commit to bb1950328/BrickSimWeb that referenced this issue Jan 28, 2021
@bb1950328
Copy link
Contributor Author

It's working! Thank you very much.

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