Skip to content

Instantly share code, notes, and snippets.

@nateyolles
Created June 1, 2016 04:04
Show Gist options
  • Save nateyolles/df2f68ba4216c14ecac189c585d60f6d to your computer and use it in GitHub Desktop.
Save nateyolles/df2f68ba4216c14ecac189c585d60f6d to your computer and use it in GitHub Desktop.
Use Client Libraries in AEM with Sightly
<head data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}">
<!--/* for css+js */-->
<meta data-sly-call="${clientLib.all @ categories='your.clientlib'}" data-sly-unwrap></meta>
<!--/* only js */-->
<meta data-sly-call="${clientLib.js @ categories='your.clientlib'}" data-sly-unwrap></meta>
<!--/* only css */-->
<meta data-sly-call="${clientLib.css @ categories='your.clientlib'}" data-sly-unwrap></meta>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment