This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Could someone please explain what is happening with the asset combination that's going on?
For example, if I have this in my default layout:
<link href="{{ ['assets/css/style.min.css']|theme }}" rel="stylesheet">
the url when inspecting in a browser ends up being something like /combine/ash3k45hkshaij....
Is there a way to turn this off for development purposes? I'm trying to use browser sync to watch for changes in my less files and inject the resulting css into the browser -- effectively as a livereload (without the actual reload). Browsersync's config looks for the filename style.min.css
in the page source within the browser, and because of the asset compilation cannot find it so I have to result to forcing it to reload.. Figured I'd see if anyone could explain what October's doing here and/or lead me to a fix.
Cheers!
If you don't want October to minify and combine your css, you can do link to the files directly.
Add this code to the head in a layout.
<link href="/themes/YourTheme/assets/css/style.min.css" rel="stylesheet">
Better still, just don't pass it as an array.
<link href="{{ 'assets/css/style.min.css'|theme }}" rel="stylesheet">
This will not minify and create a link relative to the theme directory instead.
Last updated
Thank you to both of you!
@Ben I was hoping to avoid coding in the path like that, I should've mentioned it works fine when hard-coding the file in via the theme dir.
@daftspunk This is exactly what I was looking for. Is there a docs page or reference where I could check out where / what does the minification for curiosity's sake?
1-4 of 4