I have been using cgit1 for the web frontend at git.0x1b.me ever since I started self-hosting my own git repos. It’s a great project, and, as someone who -is- used to be quite comfortable with nginx, easy to setup. My only complaint is that it has been difficult to debug, which probably wouldn’t be true if I ever bothered to compile it myself. Otherwise, it’s difficult to troubleshoot changes in the config settings when I try to make changes that I am no doubt getting wrong. I never figured out how to get markdown in the READMEs to render.

My other desire is to customize the HTML and CSS, because, you know, it’s my site. cgit creates pages by writing small snippets of html source kind of like a reverse-PHP. That pattern is convenient for a C project, but makes the iteration little harder than filling out template files stored on disk.

legit2 immediately struck me by just how clean the interface looks. There is so much whitespace and so few design elements; it’s great. Furthermore it’s written in Go, which doesn’t affect the end result, but does mean that forking and modifying the repo is more within my skillset. It was pretty easy for me to add the few missing features I wanted:

  1. scanning nested directories and grouping by them
  2. downloading .tar.gz archives for Zig’s build system
  3. listening on a unix socket
  4. add section headers to some pages

Anyway, here are just a few before-and-after screenshots

home

cgit home

legit home

repo

cgit repo

legit repo

commit

cgit commit

legit commit