hugo/tpl/tplimpl
Bjørn Erik Pedersen a55640de8e
tpl: Allow the partial template func to return any type
This commit adds support for return values in partials.

This means that you can now do this and similar:

    {{ $v := add . 42 }}
    {{ return $v }}

Partials without a `return` statement will be rendered as before.

This works for both `partial` and `partialCached`.

Fixes #5783
2019-04-02 10:30:24 +02:00
..
embedded all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
ace.go tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
amber_compiler.go tpl/tplimpl: Fix compiling Amber templates that import other templates 2018-08-17 10:04:07 +02:00
shortcodes.go tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
shortcodes_test.go Run gofmt -s 2019-03-23 20:15:06 +01:00
template.go tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
template_ast_transformers.go tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
template_ast_transformers_test.go tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
template_errors.go hugolib: Continue the file context/line number errors work 2018-10-22 20:46:14 +02:00
template_funcs.go tpl: Fix reflect 2018-12-28 10:41:46 +01:00
template_funcs_test.go Make Page an interface 2019-03-23 18:51:22 +01:00
template_info_test.go Make Page an interface 2019-03-23 18:51:22 +01:00
templateFuncster.go Make Page an interface 2019-03-23 18:51:22 +01:00
templateProvider.go commands: Show server error info in browser 2018-10-16 22:10:56 +02:00