git-preview @ main

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

Initial commit
Sun, 05 Jul 2026
25 files changed, 973 insertions(+), 508 deletions(-)
M .gitignore

@@ -1,2 +1,3 @@

legit +git-preview result
M config/config.go

@@ -46,11 +46,17 @@

if c.Repo.ScanPath, err = filepath.Abs(c.Repo.ScanPath); err != nil { return nil, err } - if c.Dirs.Templates, err = filepath.Abs(c.Dirs.Templates); err != nil { - return nil, err + // Empty dirs mean "use the assets embedded in the binary"; the + // caller fills them in (see main.go). + if c.Dirs.Templates != "" { + if c.Dirs.Templates, err = filepath.Abs(c.Dirs.Templates); err != nil { + return nil, err

… preview truncated

A embed.go

@@ -0,0 +1,41 @@

+package main + +import ( + "embed" + "io/fs" + "os" + "path/filepath" +) + +//go:embed templates static

… preview truncated

… and 22 more changed files not shown in this preview