Hello @ajeemaww9196509,
If you wish to serve static files from your AEM websites such as fonts and/or images (structural images like icons, background patterns, etc...), then you can:
- Create a new client library with all its structural requirements under the /apps/my-site/clientlibs/clientlib-site; ensure allowProxy is enabled so that /etc.clientlibs/my-site/clientlibs/clientlib-site.js|css can be accessed. Note: It's best practice to keep your site-specific client libraries in the /apps folder.
- Create a folder named of resources under the folder, example like: /apps/my-site/clientlibs/clientlib-site/resources.
- add your font file in the resources folder, example like: /apps/my-site/clientlibs/clientlib-site/resources/myfont.woff.
- Once the installation setup is complete, you can call the font from your CSS file like this:
@font-face {
font-family: "my-font";
src: url("/etc.clientlibs/my-site/clientlibs/clientlib-site/resources/myfont.woff") format("truetype");
}If you wish to further understand how client libraries are created and all its features, be sure to check out these two blogs from sgaemsolutions:
- Client Library Tutorial #1 - http://www.sgaemsolutions.com/2017/06/clientlibs-in-aem-63-part1.html
- Client Library Tutorial #2 - http://www.sgaemsolutions.com/2017/06/clientlibs-in-aem63-part2_25.html
I hope this helps.