what if my git host were a static site generator?

44 points by easrng


fanf

The classic implementation of this idea is stagit or perhaps it’s more like browsegit

[Annoyingly, “static web site” used to mean “no dynamic HTML templating” but now it sometimes means “no server-side HTML templating but lots of client-side HTML templating”.]

I would expect an in-browser git client to be really slow since it requires lots of back-and-forth chatting over a high-latency link. And I would expect a dumb-protocol client to make the server load worse since it doesn’t have the smart-protocol optimizations. Whether this is a win against bots or not depends on how much the bots are emulating a full-fat browser session; unfortunately the arms race against things like Anubis is pushing the bots in that direction.

icy

This is cool and very pretty! I'm the author of legit, which is fully server rendered in Go + HTML templates. It's... been a while since I touched it but shouldn't be terribly hard to get my agent to clean it up.

snej

when it receives an update to a git repo, it will rebuild a bunch of on-disk HTML for that. … this allows us to pay a fixed upfront cost for serving many future requests

Alternatively it could generate the HTML lazily: generating each file when it’s requested but missing, and clearing the entire cache directory whenever the repo updates.

reidrac

It looks really nice, and it feels nice even on my phone (btw, unlike GH).

I'm not completely sure what is this build on. Looks like it could be rust, but there's a 29% of ts that kind of puts me off. May make sense, that the fronted is written in ts, and I'm probably silly... but I don't want to touch that stack in my personal projects.

deuill

This is great, and right on time as my Gitea instance is being hammered to bits by LLM traffic. Now to find a good replacement for a self-hosted CI system...

oliverpool

Serving an SPA instead of Anubis feels like the better way of forcing the client to do some proof of work!

Moreover if you need the SPA to navigate, it forces the client to make multiple requests, which can be rate-limited if needed (I don't think the residential proxies share a browser).

toastal

Darcs doesn’t have branches/channels so it cat be hosted statically, without any special HTTP daemon or static generation tool, out of the box. That’s how I’ve been using it since it’s just so lightweight to slap any reverse proxy—H2O in my case—in front of a repository.

koala

Some other interesting prior art is Abbaye. I thought the author was here, but I'm not sure.