Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
3187537f
Commit
3187537f
authored
Aug 21, 2018
by
Mathias Goebel
Browse files
add 404 handler
parent
1efff57b
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/view.xql
View file @
3187537f
...
...
@@ -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)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment