diff --git a/docs/usage.adoc b/docs/usage.adoc index 0790f5b..104fd58 100644 --- a/docs/usage.adoc +++ b/docs/usage.adoc @@ -32,11 +32,13 @@ You can now move on to the various examples below: This demonstrates how to serve asset using an https://developer.enonic.com/docs/xp/stable/runtime/engines/http-service[http service]. -It shocases: +==== +This example showcases: * Serving assets from the default static folder * Overriding "immutable" default cache headers * Disabling serving of index.html files +==== . Start by *adding a service* to your app. + @@ -73,10 +75,12 @@ include::../src/main/resources/site/pages/dynamic/dynamic.ts[] Developers using site engine, may want to serve the assets from a pretty URL, rather than a service endpoint. +==== This example demonstrates * use of relativeMappedPath * using a custom static folder location +==== . Create a controller that will serve the files: + @@ -110,11 +114,13 @@ include::../src/main/resources/site/controllers/myController/files/css/styles.cs Lib static is also capable of acting like a webserver, serving html-files. In this example we use XP's /webapp feature to do the job. To make the example as realistic as possible, we use a React SPA created with Vite. -The example below demonstrates advanced features in lib static like: +==== +Showcases advanced use-cases like: * Custom Cache control handling * Fallback handling to SPA file for 404 * Custom static folder location +==== . Create a new React app using Vite +