~netlandish/gobwebs

dc3a21364176c316b8f6d74ffbdcdc597ad350f8 — Peter Sanchez 7 months ago f2d97e9
Adding 'now' html function to defaults
1 files changed, 3 insertions(+), 0 deletions(-)

M server/server.go
M server/server.go => server/server.go +3 -0
@@ 462,6 462,9 @@ func (s *Server) addDefaultTemplateData() {
		"htmlSafe": func(html string) template.HTML {
			return template.HTML(html)
		},
		"now": func(format string) string {
			return time.Now().Format(format)
		},
	})
	s.AddStaticVar("BaseURI", s.Config.BaseURI())
}