Commit 3187537f authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

add 404 handler

parent 1efff57b
......@@ -54,7 +54,12 @@ let $project := $project-path[1]
let $resource := $project-path[last()]
let $doc-path := $config:projects-dir || $project || config:get("template") || $resource
let $content := doc( $doc-path )
let $content :=
if( doc-available($doc-path)) then doc( $doc-path )
else
(doc($config:projects-dir || $project || config:get("template") || "/error.html"),
response:set-status-code( 404 )
)
return
templates:apply($content, $lookup, (), $config)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment