Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyedTemplates = map[string]string{
"::empty::": "",
"::placeholder::": "<h1>Placeholder</h1> <p>Please run <code>go generate github.com/rur/treetop-demo/...</code></p>",
}
Functions ¶
Types ¶
type Helper ¶
type Helper struct { Env *site.Env // EDITME: if you wish to use a different router library Mux *http.ServeMux }
Helper is passed to page Routes functions at startup for binding handlers and paths
func (Helper) BindEnv ¶
func (hlp Helper) BindEnv(fn ViewHandlerWithEnv) treetop.ViewHandlerFunc
BindEnv will inject the sever environment to a treetop request handler using closures
func (Helper) Handle ¶
Handle will register a pattern without filtering requests by method, the request handler is responsible for differentiating
Click to show internal directories.
Click to hide internal directories.