This issue has come up before, but not for about ten months -- would be good to have an update...
I'm a newbie playing with the demo theme to understand October.
In /assets/less/layouts/all.less I changed
body {
padding-top: 50px;
}
to
body {
padding-top: 200px;
}
A change that, if successful, would be obvious.
However, nothing changed on web page refresh (<ctrl>-r).
The first three results from a Google search on october cms preferred way to compile less are forum posts:
1) How to compile theme.less? 2) LESS compiler for OctoberCMS 3) Updated less files, not showing up after page refreshes..
1) & 2) told me that in /layouts/default.htm I need to replace
<link href="{{ [
'assets/css/theme.css'
]|theme }}" rel="stylesheet">
with
<link href="{{ [
'assets/less/theme.less'
]|theme }}" rel="stylesheet">
This worked until I made another change.
Then I discovered I could run, php artisan cache:clear in the TLD.
Now I seem to be able to make any change to a .less file, and then clear the cache, and the new css is compiled and downloaded to the browser on <ctrl>-r.
Is this current best practice, or is there a preferred/better way?
Last updated