diff --git a/tem/tem.go b/tem/tem.go index 5deb512..e334964 100644 --- a/tem/tem.go +++ b/tem/tem.go @@ -20,7 +20,6 @@ func Render( w http.ResponseWriter, r *http.Request, template string, - page string, title string, desc string, page_data interface{}, @@ -28,21 +27,21 @@ func Render( w.WriteHeader(http.StatusOK) data := struct { - Host string - Page string - Title string - Desc string - Local bool - Root bool - Data interface{} + Host string + PagePath string + Title string + Desc string + Local bool + Root bool + Data interface{} }{ - Host: r.Host, - Page: page, - Title: title, - Desc: desc, - Local: true, // (os.Getenv("LOCAL") == "true"), // toggle here for flag testing - Root: true, // (os.Getenv("HOST_IDEABRELLA") == strings.ReplaceAll(r.Host, ":3000", "")), - Data: page_data, + Host: r.Host, + PagePath: r.URL.Path, // *see header canonical link + Title: title, + Desc: desc, + Local: true, // (os.Getenv("LOCAL") == "true"), // toggle here for flag testing + Root: true, // (os.Getenv("HOST_DOFDEV") == strings.ReplaceAll(r.Host, ":3000", "")), + Data: page_data, } err := Templates.ExecuteTemplate(w, template, data)