I wanted to ask what the recommended or best method of maintaining your edits/customizations on say an existing theme is?
I’d like as an example to make edits to @rewphus’s fantastic Material Design Stock Theme and I was wondering if it would be good to fork it, build on it and then try to sync from upstream?
I know in other forum software that doesn’t use Repos or Git concepts, you would be to install a copy of the theme and then install second copy as a child and only edit the child, so that when updates came in, you’d update the parent.
You can essentially do the same thing: build your own theme component and add that as a child to your base theme (sourced from git). Then you can update the git theme as needed without impacting your custom work in the component.
That’s the simplest way, you might be duplicating some CSS but probably not an unmanageable amount.
I had read that and have completely fallen in love with the process. I’ll admit that until this year, I never really used Git to organize my work but I’m loving the workflow.
I had thought about using a theme component, but I had thought that it was supposed to be smaller-scale stuff on a conceptual level. Can a theme component edit the Color Scheme in any way? That feature seems exclusive to themes.
I will re-read that document again since it was late when I read it yesterday and begin to do this instead as a theme component :).
There’s no requirement that it is. I wouldn’t recommend copying the entire base theme and putting that in a component… that’s carrying around way more CSS than you’d need, but you can add as many overrides as you want.
Not directly, but you can create a new Color Scheme and select that as an option from the base theme’s settings. Any color scheme can be applied to any theme (how effective this is can vary based on how the theme was built).
This workflow is fine, but it might not always make sense to jump straight to a fork… especially if the original theme appears to be well-maintained. When you fork you’re more on your own if an underlying Discourse update breaks your theme.