Skip to content

Commit 61de8b0

Browse files
authored
Merge pull request #3 from matplotlib/notfound
Set up a custom 404 page
2 parents 8d05287 + a2f2ab2 commit 61de8b0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Caddyfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,12 @@
7070
try_files {path}.html {path}
7171
file_server
7272
}
73+
74+
# Use a custom 404 error page.
75+
handle_errors {
76+
@notfound expression {http.error.status_code} == 404
77+
root * {$SITE_DIR:sites}/mpl-brochure-site
78+
rewrite @notfound /404.html
79+
file_server
80+
}
7381
}

0 commit comments

Comments
 (0)