<!--/* Firsy of all, you need to import the clientlibs template */--> <sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html"> <!--/* You can then use the call API, to call the right clientlib category, for the right use case. In the example below you're calling the js files only, for the 'my.category' category */--> <sly data-sly-call="${clientLib.js @ categories='my.category'}" /> <!--/* Supposing you have special style rules for your authoring mode, you can test for wcmmode and include the right styles too while avoid requesting them in publish, for performance sake */--> <sly data-sly-call="${clientLib.css @ categories='my.category.author'}" data-sly-test="${!wcmmode.preview}" /> </sly> <!--/* You can also call ALL your code, both js and css */--> <sly data-sly-call="${clientLib.all @ categories='some.category'}" />