add more meta to html

This commit is contained in:
2025-05-11 00:08:20 +01:00
parent 5b11ad9f4b
commit 10647ab0a3
4 changed files with 19 additions and 7 deletions

View File

@@ -45,8 +45,9 @@ type pageTemplate struct {
// summaryTemplateData stores template data for summary.html
type summaryTemplateData struct {
Summary string
Location string
Summary string
Location string
LocationName string
}
// updateSubscription is the request body for creating/updating registration
@@ -368,7 +369,8 @@ func handleHTTPRequest(state *state) http.HandlerFunc {
summary, ok := state.summaries.Load(path)
if ok {
state.template.summary.Execute(writer, summaryTemplateData{summary.(string), path})
loc := supportedLocations[path]
state.template.summary.Execute(writer, summaryTemplateData{summary.(string), path, loc.displayName})
} else {
f, err := webDir.ReadFile("web/" + path)
if err != nil {