2
0
Fork 0
Old Website (Read-only archive) https://chaostreff-backnang.de
This repository has been archived on 2025-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2024-02-21 21:01:55 +01:00
css simplified css and js 2024-01-12 12:14:11 +01:00
datenschutz Initial commit 2024-01-12 02:10:45 +01:00
docs Satzung aktualisiert 2024-02-21 21:01:05 +01:00
fonts Initial commit 2024-01-12 02:10:45 +01:00
img Optimized images 2024-02-06 14:11:07 +01:00
impressum Added e.V. things to imprint 2024-02-21 21:01:55 +01:00
js fix js 2024-02-01 20:21:07 +01:00
index.htm Added me-rel for Mastodon 2024-02-21 21:01:38 +01:00
README.md Renamed in .md 2024-02-01 20:25:21 +01:00

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