Files
slide/nginx.conf
T
wonder d660febb33
Deploy Slides / build-and-deploy (push) Successful in 1m44s
fix: handle deck paths without trailing slash via 301 redirect
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 15:56:13 +08:00

22 lines
468 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Landing page
location = / {
try_files /index.html =404;
}
# /resume/1, /demo/assets/style.css — paths with trailing slash
location ~ ^/([^/]+)/ {
try_files $uri $uri/ /$1/index.html =404;
}
# /resume (no trailing slash) → 301 redirect to /resume/
location ~ ^/([^/]+)$ {
try_files $uri $uri/ =404;
}
}