hugo/tpl
bep 420c9e4d3d Add writable context to Node
The variable scope in the Go templates makes it hard, if possible at all, to write templates with counter variables or similar state.

This commit fixes that by adding a writable context to Node, backed by a map: Scratch.

This context has three methods, Get, Set and Add. The Add is tailored for counter variables, but can be used for any built-in numeric values or strings.
2015-01-31 22:01:30 +01:00
..
template.go template render with BBP 2015-01-30 11:25:54 -08:00
template_embedded.go Some more .Date.IsZero checks in internal templates 2015-01-30 22:05:03 +01:00
template_test.go Add writable context to Node 2015-01-31 22:01:30 +01:00