From d502529bf315becb82e6823ae4a4e23486732b3d Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Sun, 29 Apr 2018 15:29:22 +0300 Subject: [PATCH] Tune docs --- doc/ring/static.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/ring/static.md b/doc/ring/static.md index 740f5bc6..8abe79c0 100644 --- a/doc/ring/static.md +++ b/doc/ring/static.md @@ -1,6 +1,6 @@ # Static Resources (Clojure Only) -Static resources can be served with a help of `reitit.ring/create-resource-handler`. It takes optionally an options map and returns a ring handler to serve files from Classpath. +Static resources can be served using `reitit.ring/create-resource-handler`. It takes optionally an options map and returns a ring handler to serve files from Classpath. There are two options to serve the files. @@ -18,7 +18,7 @@ This is good option if static files can be from non-conflicting paths, e.g. `"/a (ring/create-default-handler)) ``` -To serve static files with conflicting routes, e.g. `"/*#`, one needs to disable the conflict resolution: +To serve static files with conflicting routes, e.g. `"/*"`, one needs to disable the conflict resolution: ```clj (require '[reitit.ring :as ring]) @@ -33,8 +33,7 @@ To serve static files with conflicting routes, e.g. `"/*#`, one needs to disable ## External routes -To serve files from conflicting paths, e.g. `"/*"`, one option is to mount them to default-handler branch of `ring-handler`. This way, they are only served if none of the actual routes have matched. - +A better way to serve files from conflicting paths, e.g. `"/*"`, is to serve them from the default-handler. One can compose multipl default locations using `ring-handler`. This way, they are only served if none of the actual routes have matched. ```clj (ring/ring-handler