This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I try with this {{ ['assets/sass/theme.scss']|theme }} in the layout but has an error Error: An exception has been thrown during the rendering of a template ("Invalid argument supplied for foreach()").
how is the right way to put or compile sass files?
as far as I know, this is not supported for less files, either. You have to compile them yourself, and include the output css file in your theme.
There are many ways to handle the compiling, from what I understand. Personally, I've been using gulp to compile my less files.
DMeganoski LESS is definitely supported out of the box. You just have to link up your .less file instead of the compiled .css file in your template. However, depending on which file you're working on, you may need to re-save the root .less (usually theme.less) file for it to pick up the changes and recompile on next page refresh.
Ah, I had not seen that done yet and had not tried it myself. Good to know.
My next question would have been if it compiles the files on every page load, which would be rather redundant, but seeing as you pointed out you need to make a change to the file to get it to refresh I suppose that answers that question.
That could be much easier than having to run a gulp task after every change when developing.
Still, personally I think I would prefer to do the compiling myself for a final product.
@BenjaVR Support is now integrated into core, update and make sure this is in your config/cms.php
:
/*
|--------------------------------------------------------------------------
| Check import timestamps when combining assets
|--------------------------------------------------------------------------
|
| If deep hashing is enabled, the combiner cache will be reset when a change
| is detected on imported files, in addition to those referenced directly.
| This will cause slower page performance. If set to null, assets are
| minified, when debug mode (app.debug) is disabled.
|
*/
'enableAssetDeepHashing' => true,
LookAgency said:
@BenjaVR Support is now integrated into core, update and make sure this is in your
config/cms.php
:/* |-------------------------------------------------------------------------- | Check import timestamps when combining assets |-------------------------------------------------------------------------- | | If deep hashing is enabled, the combiner cache will be reset when a change | is detected on imported files, in addition to those referenced directly. | This will cause slower page performance. If set to null, assets are | minified, when debug mode (app.debug) is disabled. | */ 'enableAssetDeepHashing' => true,
Thanks!
1-9 of 9