mirror of https://github.com/jlelse/GoBlog
14 lines
345 B
Go
14 lines
345 B
Go
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{
|
|
Blog: blog,
|
|
Canonical: appConfig.Server.PublicAddress + page.Path,
|
|
Data: page.Data,
|
|
})
|
|
}
|
|
}
|