diff --git a/Makefile b/Makefile index 68066f2..e8803b5 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,2 @@ -minecraft-site: minecraft-site.go index.html go.mod go.sum +minecraft-site: go build -tags netgo -ldflags '-extldflags "-static"' diff --git a/minecraft-site.go b/minecraft-site.go index a653bee..4794928 100644 --- a/minecraft-site.go +++ b/minecraft-site.go @@ -2,7 +2,6 @@ package main import ( "crypto/tls" - _ "embed" "encoding/json" "fmt" "html/template" @@ -36,9 +35,6 @@ type pageData struct { Servers []server } -//go:embed index.html -var indexhtml string - func main() { // Parse config file @@ -67,7 +63,7 @@ func main() { // Set up templates fmt.Print("Parsing templates...\n") - t, err := template.New("").Parse(indexhtml) + t, err := template.ParseFiles("templates/index.html") if err != nil { log.Fatalf("Error parsing HTML template: %v\n", err) } diff --git a/index.html b/templates/index.html similarity index 100% rename from index.html rename to templates/index.html