Rename htmlpage to html

Because it's going to get more tools.
This commit is contained in:
Eli Ribble 2026-01-30 18:21:27 +00:00
parent 2bd848fa97
commit 9b1d75d47f
No known key found for this signature in database
44 changed files with 83 additions and 77 deletions

22
html/static.go Normal file
View file

@ -0,0 +1,22 @@
package html
import (
"embed"
"io/fs"
"net/http"
"github.com/go-chi/chi/v5"
"github.com/rs/zerolog/log"
)
//go:embed static/*
var EmbeddedStaticFS embed.FS
var localFS http.Dir
func AddStaticRoute(r chi.Router, path string) {
if localFS == "" {
localFS = http.Dir("./html/static")
}
FileServer(r, "/static", localFS, EmbeddedStaticFS, "static")
}