mirror of
https://git.p-schwarz.de/ctbk/ctbk.de.git
synced 2025-05-18 21:35:34 +00:00
Website des Chaostreff Backnang
css | ||
datenschutz | ||
docs | ||
fonts | ||
img | ||
impressum | ||
js | ||
index.htm | ||
README.md |
Website des Chaostreff Backnang
nginx config
# Charset
charset UTF-8;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Site-Icon Rules
rewrite ^/favicon\.ico$ img/favicon.ico redirect;
# Caching
location ~* \.(?:jpg|gif|png|ico|gz|svg|css|js|pdf|woff|woff2)$ {
access_log off;
log_not_found off;
expires 1w;
add_header Cache-Control "public";
add_header Cache-Control "max-age=604800";
gzip_static on;
}
index index.html index.htm;
Minify resources
for file in `find -name "*.js" -not -name "*.min.js" -not -name "sw.js" -type f` ; do F_NAME=$(dirname ${file})/$(basename ${file} .js); uglifyjs ${file} > ${F_NAME}.min.js; done
for file in `find -name "*.css" -not -name "*.min.css" -type f`; do F_NAME=$(dirname ${file})/$(basename ${file} .css); cleancss ${file} > ${F_NAME}.min.css; done
optipng -o7 -zm1-9 -strip all img/*.png
for file in `find -name "*.min.css" -o -name "*.min.js" -o -name "*.svg" -type f`; do zopfli --i1000 ${file}; done