diff --git a/.husky/pre-commit b/.husky/pre-commit index 075dc6e..c247eaf 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,4 @@ -pnpm run test:ci +# Only run CI tests when files under src/ are changed +if git diff --cached --name-only | grep -q '^src/'; then + pnpm run test:ci +fi diff --git a/nginx.conf b/nginx.conf index 258f77d..4eb3681 100644 --- a/nginx.conf +++ b/nginx.conf @@ -103,9 +103,9 @@ http { access_log off; } - # Default location + # Default location: try $uri.html so /services serves services.html, /services/foo serves services/foo.html location / { - try_files $uri $uri/ /index.html; + try_files $uri $uri.html $uri/ /index.html; } # 410 Gone: permanently removed URLs (tells crawlers to deindex)