Css custom attributes not working

Can someone help me understand why the code from the documentation is not working for me. I’m try to add custom attributes to my css load (so that I can bring in bootstrap) but custom attributes aren’t working.

My code:
{% do assets.addCss('theme://css/styles.css',{'group':'mygroup'}) %} {{ assets.css('mygroup',{'rel':'alternate'}) }}

Is rendering as:
<link href="/user/themes/my-theme-name/css/styles.css" type="text/css" rel="stylesheet">

So… obviously not picking up my custom attribute. Here’s the example from the documentation which is not working for me: https://learn.getgrav.org/16/themes/asset-manager#change-attribute-of-the-rendered-css-js-assets


@skipper, Try switching on the ‘pipeline’ of css in ‘/user/config/system.yaml’:

  css_pipeline: true


  • With css_pipeline: false, the options of assets.addCss(asset, [options]) are being used.
  • With css_pipeline: true, the options of assets.css(asset, [options]) are being used.

Same holds for assets.addJs() and assets.js()

Thank you. That got my attributes working.