Skip to content

Commit

Permalink
minor tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lund Sigdestad committed Oct 23, 2024
1 parent 967416c commit 7827ee4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
+
Expand Down Expand Up @@ -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:
+
Expand Down Expand Up @@ -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
+
Expand Down

0 comments on commit 7827ee4

Please sign in to comment.