Simple blogging system written in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
389 B

package main
import "net/http"
const customPageContextKey = "custompage"
func (a *goBlog) serveCustomPage(w http.ResponseWriter, r *http.Request) {
page := r.Context().Value(customPageContextKey).(*configCustomPage)
a.render(w, r, page.Template, &renderData{
BlogString: r.Context().Value(blogKey).(string),
Canonical: a.getFullAddress(page.Path),
Data: page.Data,