Using twitter bootstrap and assetic badges

I have a configuration and work with the following configuration

assetic:
    assets:
        global:
            inputs:
                - '%kernel.root_dir%/Resources/public/less/global.less'
    debug:          %kernel.debug%
    use_controller: false
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        less:
            node:       /usr/local/bin/node
            node_paths: [/usr/local/lib/node, /usr/local/lib/node_modules]
            apply_to: "\.less$"

In my twig file, I have the following which prints a css file perfectly.

{% stylesheets filter='less,cssrewrite'
   '@global'
%}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}

Here is my app / Resources / public / global.less file

@import "../../../../vendor/twitter/bootstrap/less/bootstrap.less";


/*
* Global Styles
*/
body{
    background: #333;
}

The problem is that I cannot use Twitter Bootstrap badges because they are 404. My images currently live in. app/Resources/public/img/I tried everything to get them working and tried every assetic command.

Do I need cssembed as mentioned here ? I hope I do not need to run Java to achieve this.

+5
source share
1 answer

-, , , . / . : install before assetic: dump. . , , .

{% block head_style %}
{% stylesheets filter='yui_css, cssrewrite' 
        'bundles/bgcomun/css/bootstrap.css'
            'bundles/bgcomun/css/comun.css'
             output='css/compiled/main.css'


    %}
    <link href="{{ asset_url }}" type="text/css" rel="stylesheet"
          media="screen" />
{% endstylesheets %}
+1

All Articles