The books
Back in 2004, before I had any idea how to code, I created a monster. Started with sgf files containing the problem collections, wrote an awful Perl script rotating the problems to the upper left corner. (Hey, it's just 100 lines of code and actually does something. These days I write thousands of lines of code to do nothing much at all.)
Then used sgf2dg (back when it was called sgf2tex!) to spit out TeX output. PdfTeX to get pdfs and voila.
This would be a good place to thank Toxygen. When processed with pdfTeX, the Metafont fonts get inserted as bitmaps and look very ugly. I spent weeks trying to convert the Metafont go diagram fonts into PostScript format. Then Majo came along and converted them, I still have no idea how he did it. If you ever want to produce go pdf's from TeX, get the PostScript fonts, now maintained by the good people at Otrego.
The mess of a source is available on GitHub.
The website
I forget how this was done before 2013, but from 2013 to 2024 we've suffered under Twitter Bootstrap. Now the website is styled by Pure.css to great happiness and simplification.
Middleman has been aging nicely these 10 years.
You can see the source of the Tsumego Collections website and submit bug reports.