Initial commit: Hugo site with Caddy infra and deploy tooling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
24
infra/Caddyfile
Normal file
24
infra/Caddyfile
Normal file
@@ -0,0 +1,24 @@
|
||||
monotrope.au {
|
||||
root * /var/www/monotrope
|
||||
file_server
|
||||
|
||||
# Compression
|
||||
encode zstd gzip
|
||||
|
||||
# Cache headers for static assets
|
||||
@static {
|
||||
path *.css *.js *.ico *.gif *.jpg *.jpeg *.png *.webp *.svg *.woff *.woff2 *.ttf *.eot
|
||||
}
|
||||
header @static Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
# HTML and RSS — revalidate each time
|
||||
@html {
|
||||
path *.html / /posts/ /posts/*
|
||||
}
|
||||
header @html Cache-Control "public, max-age=0, must-revalidate"
|
||||
}
|
||||
|
||||
# Redirect www to apex
|
||||
www.monotrope.au {
|
||||
redir https://monotrope.au{uri} permanent
|
||||
}
|
||||
Reference in New Issue
Block a user