Static library
Contents
Introduction
Achieve ultra-high performance with detailed control over edge and client caching for your static assets. Serve files bundled in your Enonic app (i.e. js, css + html) with fine-grained control over cache headers and error handling, suitable even for hosting static webapps and SPAs.
For a more simplistic approach to asset hosting, check out lib-asset instead. |
Usage
There are many ways of setting up and using lib-static, the gist is:
-
Add a dependency to lib-static
-
Place your files in the
/src/main/resources/static/
folder -
Use a service, mapping or webapp to deliver the assets.
-
Use relative links, or create links to assets from your controllers
We have created hands-on usage examples to give you a flying start.
For more details, visit the API documentation