Hacker News new | ask | show | jobs
by jjk166 1254 days ago
Every couple of months I wind up making a quick s3 static site which isn't too difficult but doing it manually there are several steps spread out across many pages and it's easy to forget one if it's been a while. Every time I do it I wish I had written a script to automate it the last time.
2 comments

Kind of related, I recently wondered why there is no such thing as a packaging format for static sites. It sounds trivial but hear me out.

There are many static site generators that spit out a directory with HTML files ready to be served. But getting that output in S3, netlify or your self hosted nginx is a very different process. Configuring things like cache-control, redirections, compression or error pages is done differently on all these platforms.

Wouldn't it be nice if it was possible to basically generate a tar.gz with some metadata that would automatically configure the web server and deploy the site? Kind of like a docker image but for static files?

Netlify is basically that, push to git and it'll auto deploy, along with serverless functions if you need something like a back-end. Github Pages works too for purely static sites. Cloudflare probably has a similar offering.