Pages

Monday, 10 March 2014

Issues when using LESS CSS in Adobe CQ/AEM

When working with LESS CSS in adobe CQ, make a note point during your check in/packaging.

When you open a page, the .less files are converted to .css files as shown below:

etc/designs/myapp/
                         css/static.less

etc/designs/myapp/
                         css/generated/static.css
                         css/static.less

In this case, make sure you should not check in/package your generated folder and its sub folders/files. What you want to check in/package is just your .less files. 

If you check in/package the generated folder, you may run in to issues when your less  files are updated. This means, when a less file is updated, the generated css file may not update with the latest code all times.


Converting InputStream to String

    private String convertToString(InputStream inputStreamObj)             throws IOException {         if (inputStreamObj != null) {     ...