diff --git a/README.md b/README.md index 390087f..357b198 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,14 @@ With this snippet in the Caddyfile, for a site one can `import err` to handle er ``` (err) { - root /err_css/* /www/err - root /err_images/* /www/err + @errpaths { + path /err_css/* + path /err_images/* + } + route @errpaths { + root * /www/err + file_server + } respond /unknown_error_not_4xx_not_5xx "{http.error.status_code} {http.error.status_text}" handle_errors { diff --git a/dist/4xx.html b/dist/4xx.html new file mode 100644 index 0000000..cfcd5da --- /dev/null +++ b/dist/4xx.html @@ -0,0 +1 @@ +{{placeholder "http.error.status_code"}} Error!
UNICORN

Oh no! {{placeholder "http.error.status_code"}}, {{placeholder "http.error.status_text"}}

You tried to get something that can't be got!

(Unicorn image Creative Commons 4.0 BY-NC via pngimg.com)

\ No newline at end of file diff --git a/dist/5xx.html b/dist/5xx.html new file mode 100644 index 0000000..b835345 --- /dev/null +++ b/dist/5xx.html @@ -0,0 +1 @@ +{{placeholder "http.error.status_code"}} Error!
UNICORN

K̸z̴z̷t̵!̷ — {{placeholder "http.error.status_code"}}, {{placeholder "http.error.status_text"}}

Something went wrong. Try going home…

(Unicorn image Creative Commons 4.0 BY-NC via pngimg.com)

\ No newline at end of file diff --git a/dist/err_images/content/4xx_rainbow.jpg b/dist/err_images/content/4xx_rainbow.jpg new file mode 100644 index 0000000..90da59b Binary files /dev/null and b/dist/err_images/content/4xx_rainbow.jpg differ diff --git a/dist/err_images/content/4xx_unicorn.png b/dist/err_images/content/4xx_unicorn.png new file mode 100644 index 0000000..1aa0eb4 Binary files /dev/null and b/dist/err_images/content/4xx_unicorn.png differ diff --git a/dist/err_images/content/5xx_rainbow.jpg b/dist/err_images/content/5xx_rainbow.jpg new file mode 100644 index 0000000..3e6cd06 Binary files /dev/null and b/dist/err_images/content/5xx_rainbow.jpg differ diff --git a/dist/err_images/content/5xx_unicorn.png b/dist/err_images/content/5xx_unicorn.png new file mode 100644 index 0000000..0d29502 Binary files /dev/null and b/dist/err_images/content/5xx_unicorn.png differ