Development mode for themes?

Hi
I’m developing a new theme for OJS but it looks like CSS files are being cached. I’ve just started with a copy of GitHub - NateWr/defaultChild: An example child theme for OJS 3. and testing changes to remove-borders.less. I tried clearing the template cache but nothing happens, new styles are not being applied.

I suppose I have to press that button every time I change the styles. Is there any option to skip the cache and regenerate the styles automatically?

I don’t know if this is the best way, but I usually switch between two themes (for example default theme and child theme). So I make my changes, switch to default theme (and reload and wait a few seconds - that might not be necessary, but sometimes the system doesn’t use my changes, if I don’t do this), switch back to my child theme (reload again and wait a few seconds) and reload than my frontend. I think the less files need to be rendered, so the theme needs to be loaded again, but this ist just my assumption.

Kind regards
Daniela

1 Like

Thanks @UBWolf.

Somehow new styles started to be applied, now I just click on the save button (on the options page) and they are refreshed.

Hope to see in the future an option to skip the cache and regenerate styles every time site is loaded, for development purposes.

Check this great plugin from @NateWr GitHub - NateWr/cacheBuster: A plugin for OJS 3.1+ that will clear the CSS and template cache with every page load.

2 Likes