Open delaneyj opened 2 months ago
is the staticPath
function appending the static
prefix after if locates the name using HashName
? I had to do a bit of trickery when I just had an issue today:
func funcMap() template.FuncMap {
return template.FuncMap{
"static": func(s string) string {
s = strings.TrimPrefix(s, "/static/")
return "/static/" + static.HashName(s)
},
}
}
If I use the static path directly
it works however if I generated the hashFS with a helper
Both way use the
hashfs.FileServer
so I'm surprised by the behavior. Any thoughts would helpful.