hugo/hugolib
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
..
author.go
benchmark_test.go
handler_base.go
handler_file.go
handler_meta.go
handler_page.go Use a regular expression in replaceShortcodeTokens 2015-01-30 20:58:25 +01:00
hugo.go Fix the Hugo.Generator tag so it can be used 2015-01-19 08:26:06 +01:00
media.go
menu.go
menu_test.go Move s.prepUrl() before prepending BaseUrl. 2015-01-26 01:03:18 +01:00
node.go Add writable context to Node 2015-01-31 22:01:30 +01:00
page.go Prevent site config being overwritten 2015-01-31 19:14:13 +01:00
page_permalink_test.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page_taxonomy_test.go
page_test.go Add site-wide/per-page [blackfriday] extensions option 2015-01-26 09:55:37 +01:00
page_time_integration_test.go
pageGroup.go
pageGroup_test.go
pageSort.go
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go Improve pagination testing 2015-01-27 01:27:07 +01:00
pagination_test.go Replace assert.Equal(true/false) with assert.True/False 2015-01-27 19:47:22 +01:00
path_separators_test.go Correct spelling of two test files: seperators → separators 2015-01-11 02:21:51 -07:00
path_separators_windows_test.go Correct typo in hugolib/path_separators_windows_test.go 2015-01-12 13:15:04 -07:00
permalinks.go
permalinks_test.go
planner.go
redis.cn.md [Docs] Copyediting 2015-01-28 18:02:40 -07:00
rss_test.go
scratch.go Add writable context to Node 2015-01-31 22:01:30 +01:00
scratch_test.go Add writable context to Node 2015-01-31 22:01:30 +01:00
shortcode.go Updating shortcode imports & site test to work with new buffer pool functions 2015-01-31 01:24:52 -05:00
shortcode_test.go Use strings instead of byte arrays for replaceShortcodeTokens tests 2015-01-30 20:58:25 +01:00
shortcodeparser.go
shortcodeparser_test.go
site.go page rendering and writing using BBP 2015-01-30 12:05:05 -08:00
site_show_plan_test.go
site_test.go Updating shortcode imports & site test to work with new buffer pool functions 2015-01-31 01:24:52 -05:00
site_url_test.go Add pagination support for home page, sections and taxonomies 2015-01-26 12:59:37 +01:00
siteinfo_test.go
sitemap.go
sitemap_test.go
summary.go
taxonomy.go
taxonomy_test.go