From b87964e81f99e03dd5ed2983d3788ae2170de237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 1 Aug 2025 12:54:51 +0200 Subject: feat(config): supports external link for images --- main.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 4ef6f6d..23c3f69 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/BurntSushi/toml" "github.com/anhgelus/golatt" + "html/template" "log/slog" "net/http" "os" @@ -127,6 +128,10 @@ func main() { http.Redirect(w, r, "/", http.StatusTemporaryRedirect) } + g.TemplateFuncMap = template.FuncMap{ + "getImage": getImage, + } + host := fmt.Sprintf(":%d", port) if dev { if port != 80 { -- cgit v1.2.3