From 60ca3b1a4f571c2fe525cd9bcb7cba22c39afb64 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 13 Apr 2026 15:50:55 -0400 Subject: [PATCH] fix: add favicon, reduce CSS/JS cache to 1h for faster updates SVG favicon with tree logo on dark green background. Split nginx cache rules: images stay 30d immutable, CSS/JS reduced to 1h with must-revalidate so deploys are visible immediately. Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 1 + favicon.svg | 17 +++++++++++++++++ index.html | 1 + nginx.conf | 7 ++++++- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 favicon.svg diff --git a/Dockerfile b/Dockerfile index 08c5e0f..98fd696 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,5 +3,6 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf COPY index.html /usr/share/nginx/html/ COPY styles.css /usr/share/nginx/html/ COPY script.js /usr/share/nginx/html/ +COPY favicon.svg /usr/share/nginx/html/ COPY images/ /usr/share/nginx/html/images/ EXPOSE 80 diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..1ae588c --- /dev/null +++ b/favicon.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html index 0bcffb5..3b42a0a 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,7 @@ Tino Andri | Heilung, Natur & Bewusstsein | Scuol, Engadin + diff --git a/nginx.conf b/nginx.conf index 1228f3f..f96ced3 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,11 +8,16 @@ server { try_files $uri $uri/ /index.html; } - location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|webp)$ { + location ~* \.(jpg|jpeg|png|gif|ico|svg|webp)$ { expires 30d; add_header Cache-Control "public, immutable"; } + location ~* \.(css|js)$ { + expires 1h; + add_header Cache-Control "public, must-revalidate"; + } + gzip on; gzip_types text/plain text/css application/javascript image/svg+xml; gzip_min_length 256;