From: Mark Jamsek Subject: Re: gotwebd: enhance blob pages To: Omar Polo Cc: gameoftrees@openbsd.org Date: Wed, 4 Jan 2023 22:11:46 +1100 On 23-01-04 10:47AM, Omar Polo wrote: > Hello, > > this reworks the current blob page so that it displays the file > content inline. The current blob page is renamed to BLOBRAW, and > binary files are automatically redirected to this page (so that > i.e. clicking on a PNG icon downloads it as it does now.) > > I'll add a few links to the raw version of the files in the blob page > and in the tree listing in a follow-up commit. > > This also introduces a getline(3)-like function for blobs, as hinted > in a previous mail. > > There are some details that I'd like to improve, both in the CSS and > in the code, but I think it can be done in tree. > > I'm running with this patch on my server. Here's an example of a > comment I need to tweak eventually: > > https://git.omarpolo.com/?action=blob&commit=025c25369f278576ed92bc0c80a5b9a61a2e851f&file=got-read-patch.c&folder=%2Flibexec%2Fgot-read-patch&path=got.git#line433 Very nice! > (I still trust Larry, don't worry, I just got why patch(1) prefers to > do an append rather than insert, but that's for another tread ;-) I'm looking forward to it :) > Note that this needs my latest commit in main. > > > diff refs/heads/main refs/heads/blob > commit - 0b287d3f8df90ae3e97d9c35ac16299fd63e0c3e > commit + 0e7a0d67888857fbe676b6c6ef640373e663b4d7 ok for me -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68