Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions templates/Caddyfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
handle_path /{args.0}/* {
root * {{ caddy.site_dir }}/{args.0}
try_files {path}.html {path}
file_server
file_server {
hide .git
}
}
}

Expand Down Expand Up @@ -77,14 +79,18 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} {
handle {
root * {{ caddy.site_dir }}/matplotlib.github.com
try_files {path}.html {path}
file_server
file_server {
hide .git
}
}

# Use a custom 404 error page.
handle_errors {
@notfound expression {http.error.status_code} == 404
root * {{ caddy.site_dir }}/mpl-brochure-site
rewrite @notfound /404.html
file_server
file_server {
hide .git
}
}
}