This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi, i recently found out about OctoberCMS, and it is already awesome!
I've got just one question: does october do auto compilation of less files (like bootstrap provides) and make it to simple css production file ?
In October, a PHP version of the less compiler is included in the \vendor\oyejorge directory.
October does come with a built-in less-compiler. There is a catch though, it does not compile the newest bootstrap versions and it does not check for changes in includes (@import
). For a recompile on a change in an import, you can add ;
somewhere in your first file. It does not generate any errors, and the compiler will see it as a change and recompile the less to css.
Add this to your head and you'll be writing less in no time.
<link href="{{ [
'assets/less/theme.less'
]|theme }}" rel="stylesheet">
Keep in mind that you can add multiple less files like:
<link href="{{ [
'assets/less/theme.less',
'assets/less/layout/main.less',
'....',
]|theme }}" rel="stylesheet">
Last updated
Hi i am using blank bootstrap theme as starter. If you're changing the variables.less, theme.less, are you allowed to add somthing like this?
<link href="{{ [
'assets/less/app.less',
'assets/less/site/theme.less',
'assets/vendor/bootstrap/less/theme.less',
'assets/vendor/bootstrap/less/variables.less'
]|theme }}" rel="stylesheet">
Last updated
Is it possible to do something like this ?
<link href="{{ [
'assets/less/app.less',
'assets/less/site/theme.less',
'assets/vendor/bootstrap/less/theme.less',
'@nice-blue: #5B83AD; @color: #4D926F'
]|theme }}" rel="stylesheet">
Last updated
My 2 cents here, Gulp/Grunt might be a bit more flexible and you won't have to worry about imports not being watched.
@kh_october13612, I don't believe so - the asset combiner only accepts paths to files as arguments.
@pratyushpundir6424 October now supports watching imports, along with compilation of SCSS files as long as you enable
/*
|--------------------------------------------------------------------------
| 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,
in config/cms.php
@LukeTowers - Oooh nice! Thanks for sharing. Completely missed reading that docBlock in config.
Laravel has elixir for compile assets without problems. )))
Very simple setup for gulpfile.js:
var elixir = require('laravel-elixir');
elixir(function(mix){
mix.less('./themes/itmoko/assets/less/vendor.less', './themes/itmoko/assets/css/vendor.css');
mix.less('./themes/itmoko/assets/less/theme.less', './themes/itmoko/assets/css/theme.css');
});
Last updated
1-11 of 11