aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-08-01 12:54:51 +0200
committerWilliam Hergès <william@herges.fr>2025-08-01 12:54:51 +0200
commitb87964e81f99e03dd5ed2983d3788ae2170de237 (patch)
tree87f67980eda97dc8e228588ad0d33004156649f1 /main.go
parentb7829c52685fe019e9de66f562206f909bd67876 (diff)
feat(config): supports external link for images
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
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 {