git-preview @ main

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

routes: render readme
Mon, 12 Dec 2022
5 files changed, 53 insertions(+), 19 deletions(-)
M config.yaml

@@ -1,5 +1,10 @@

git: scanPath: /home/icy/code/tmp + readme: + - readme + - README + - readme.md + - README.md template: dir: ./templates meta:
M config/config.go

@@ -9,7 +9,8 @@ )

type Config struct { Git struct { - ScanPath string `yaml:"scanPath"` + ScanPath string `yaml:"scanPath"` + Readme []string `yaml:"readme"` } `yaml:"git"` Template struct { Dir string `yaml:"dir"`
M routes/handler.go

@@ -1,6 +1,8 @@

package routes import ( + "net/http" + "github.com/alexedwards/flow" "icyphox.sh/legit/config" )

@@ -8,6 +10,12 @@

func Handlers(c *config.Config) *flow.Mux { mux := flow.New()

… preview truncated

… and 2 more changed files not shown in this preview