GoBlog/customPages.go

14 lines
345 B
Go
Raw Normal View History

2020-10-13 11:40:16 +00:00
package main
import "net/http"
func serveCustomPage(blog *configBlog, page *customPage) func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
render(w, page.Template, &renderData{
2020-11-01 17:37:21 +00:00
Blog: blog,
Canonical: appConfig.Server.PublicAddress + page.Path,
Data: page.Data,
2020-10-13 11:40:16 +00:00
})
}
}