From a9e304ee08e68b05015a9eff4759fe8d4dabe37e Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 25 Jun 2025 22:49:57 +0100 Subject: [PATCH] Fix embedding of static files --- cmd/server/main.go | 5 +---- internal/conf/conf.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index e86faaf..13bd2cc 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -26,10 +26,7 @@ func main() { router.Handle( "/static/", logger( - http.StripPrefix( - "/static/", - http.FileServer(http.FS(conf.Static)), - ), + http.FileServer(http.FS(conf.Static)), ), ) diff --git a/internal/conf/conf.go b/internal/conf/conf.go index aba9c12..5124677 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -72,7 +72,7 @@ var ( {Path: "icons/eye.svg", Url: "https://raw.githubusercontent.com/twbs/icons/refs/heads/main/icons/eye.svg"}, } BaseTemplate string = "base.tmpl.html" - //go:embed static/* + //go:embed static/css/* static/icons/* static/js/* Static embed.FS //go:embed templates/* Templates embed.FS