git-preview @ main

static git web frontend but with images and html previews + code truncation

re-add accidentally removed code for raw file view
Fri, 29 Mar 2024
1 files changed, 5 insertions(+), 0 deletions(-)
M routes/routes.go

@@ -199,6 +199,11 @@ return

} func (d *deps) FileContent(w http.ResponseWriter, r *http.Request) { + var raw bool + if rawParam, err := strconv.ParseBool(r.URL.Query().Get("raw")); err == nil { + raw = rawParam + } + name := r.PathValue("name") if d.isIgnored(name) {

… preview truncated