55a9f889da
Deploy / deploy (push) Failing after 2s
- Add generate-nav.sh to scan directories and build index.html - Add nav generation step in workflow before docker build - Replace nginx autoindex with custom nav page - Auto-extract page title from <title> tag
27 lines
607 B
Nginx Configuration File
27 lines
607 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
gzip_min_length 256;
|
|
|
|
# Static assets caching
|
|
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff2|ttf)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public, no-transform";
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# Each subdirectory serves its page
|
|
location ~ ^/([^/]+)/ {
|
|
try_files $uri $uri/ /$1/index.html;
|
|
}
|
|
}
|