Highlighted

How to Serve Static Assets in AEM as Client Library Resources | AEM Community Blog Seeding

kautuk_sahni

Community Manager

12-07-2020

BlogImage.jpg

How to Serve Static Assets in AEM as Client Library Resources by sourcedcode

Abstract

This article provides step by step instructions on how to create a client library, to only serve structural static assets as client library resources. Resources from this article will build upon the latest maven AEM Project Archetype, and the instructions below will demo the configuration setup within the code.

Instructions
1. Create a cq:ClientLibraryFolder node
JCR Path: /apps/sourcedcode/clientlibs/cllienlib-site
Separate code from content and configuration to maximize project file oranization and separation of concerns, Adobe recommends to place client libraries under /apps and expose these client libraries via the path, /etc.clientlibs, by leveraging the allowProxy property.




2. Create a nt:folder node named “resources”
JCR Path: /apps/sourcedcode/clientlibs/cllienlib-site/resources
By convention, the client library “resource” folder is named as “resources”; which the naming is very important if structural static assets are planned be served from a client library. This setup allowes structural static assets to be accessed via the proxy.

Read Full Blog

How to Serve Static Assets in AEM as Client Library Resources

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager