Fix embedding of static files

This commit is contained in:
Maximilian Friedersdorff 2025-06-25 22:49:57 +01:00
parent 8edd857d22
commit a9e304ee08
2 changed files with 2 additions and 5 deletions

View file

@ -26,10 +26,7 @@ func main() {
router.Handle( router.Handle(
"/static/", "/static/",
logger( logger(
http.StripPrefix( http.FileServer(http.FS(conf.Static)),
"/static/",
http.FileServer(http.FS(conf.Static)),
),
), ),
) )

View file

@ -72,7 +72,7 @@ var (
{Path: "icons/eye.svg", Url: "https://raw.githubusercontent.com/twbs/icons/refs/heads/main/icons/eye.svg"}, {Path: "icons/eye.svg", Url: "https://raw.githubusercontent.com/twbs/icons/refs/heads/main/icons/eye.svg"},
} }
BaseTemplate string = "base.tmpl.html" BaseTemplate string = "base.tmpl.html"
//go:embed static/* //go:embed static/css/* static/icons/* static/js/*
Static embed.FS Static embed.FS
//go:embed templates/* //go:embed templates/*
Templates embed.FS Templates embed.FS