diff --git a/templates/Caddyfile.j2 b/templates/Caddyfile.j2 index 317982a..5e721fd 100644 --- a/templates/Caddyfile.j2 +++ b/templates/Caddyfile.j2 @@ -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 + } } } @@ -77,7 +79,9 @@ 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. @@ -85,6 +89,8 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} { @notfound expression {http.error.status_code} == 404 root * {{ caddy.site_dir }}/mpl-brochure-site rewrite @notfound /404.html - file_server + file_server { + hide .git + } } }