git-preview @ main

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

markdown: more file exts, fix img
Mon, 26 Dec 2022
2 files changed, 9 insertions(+), 2 deletions(-)
M routes/routes.go

@@ -110,8 +110,11 @@ ext := filepath.Ext(readme)

content, _ := gr.FileContent(readme) if len(content) > 0 { switch ext { - case ".md": - unsafe := blackfriday.Run([]byte(content), blackfriday.WithExtensions(blackfriday.CommonExtensions)) + case ".md", ".mkd", ".markdown": + unsafe := blackfriday.Run( + []byte(content), + blackfriday.WithExtensions(blackfriday.CommonExtensions), + )

… preview truncated

M static/style.css

@@ -162,6 +162,10 @@ .readme ul {

padding: revert; } +.readme img { + max-width: 100%; +} + .diff { margin: 1rem 0 1rem 0; padding: 1rem 0 1rem 0;