/jsgal

Primary LanguageJavaScript

tsgal

Quick and dirty image gallery using Photoswipe, yall, sharp, and ejs.

usage

npm init -y
npm install
npx webpack
node make-template.js --imageDir /path/to/images > images.html

web server

Nginx example:

server {
    listen 0.0.0.0:443 ssl;
    include /etc/nginx/ssl.conf;
    http2 on;

    root /var/www/tsgal;
    location / { 
        try_files $uri $uri/ =404;
    }   
}

notes

  • Image lazy loading is baked into browsers by default these days:

    <img loading="lazy" />