Commit graph

8 commits

Author SHA1 Message Date
bep 8ad9c0a7dd Make Where template-method accept methodname as key
This is necessary to make constructs like `{{ range first 1 (where .Data.Pages "Type" "post") }}` -- as Type and Section is methods not fields.
2014-11-13 12:42:26 -05:00
Tatsushi Demachi af47e5a2cf Extend template's mod and modBool functions to accept any int types
Fixes #575
2014-11-01 23:00:46 -04:00
bep da5d98e958 Make First accept any int
TOML and YAML handles integers differently, creating issues when using integer values from configuration or front matter in the First template function.

This currently works in YAML (parses into int), but not in TOML (parses into int64).

This commit modifies First so it accepts any int.

Fixes #551
2014-10-15 12:39:09 -04:00
bep 16330cea91 Add nil-check to Intersect
The Intersect template-method would fail if one or both of the lists were nil (post vs page; post has tags, page has not).

This commit adds a nil-check and returns an empty result if any of the inputs are nil.

See #537
2014-10-15 12:31:22 -04:00
Tatsushi Demachi 5d565c34e5 Extend template's basic math functions to accept float, uint and string values 2014-09-22 09:01:40 -04:00
Tatsushi Demachi 002a5b6756 Add 'where' template function 2014-08-18 11:31:17 -04:00
Vincent Batoufflet 73cbefdbc8 Make template comparison functions handle floats 2014-05-10 15:38:18 -04:00
spf13 4a8de8ea46 Add Disqus support out of the box. Move template/bundle into hugolib. 2014-04-23 02:53:12 -04:00
Renamed from template/bundle/template_test.go (Browse further)