pass page path automatically to header
This commit is contained in:
parent
3c182fc1df
commit
28d7648c50
1 changed files with 14 additions and 15 deletions
|
@ -20,7 +20,6 @@ func Render(
|
|||
w http.ResponseWriter,
|
||||
r *http.Request,
|
||||
template string,
|
||||
page string,
|
||||
title string,
|
||||
desc string,
|
||||
page_data interface{},
|
||||
|
@ -29,7 +28,7 @@ func Render(
|
|||
|
||||
data := struct {
|
||||
Host string
|
||||
Page string
|
||||
PagePath string
|
||||
Title string
|
||||
Desc string
|
||||
Local bool
|
||||
|
@ -37,11 +36,11 @@ func Render(
|
|||
Data interface{}
|
||||
}{
|
||||
Host: r.Host,
|
||||
Page: page,
|
||||
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_IDEABRELLA") == strings.ReplaceAll(r.Host, ":3000", "")),
|
||||
Root: true, // (os.Getenv("HOST_DOFDEV") == strings.ReplaceAll(r.Host, ":3000", "")),
|
||||
Data: page_data,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue