Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the partial template func to return any type #5788

Merged
merged 2 commits into from Apr 2, 2019

Conversation

bep
Copy link
Member

@bep bep commented Mar 25, 2019

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.

Fixes #5783

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.

Fixes gohugoio#5783
@bep
Copy link
Member Author

bep commented Mar 27, 2019

@moorereason I put you as a reviewer of this if you have some time ...

@bep bep merged commit a55640d into gohugoio:master Apr 2, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the partial template func to return any type, not just strings
1 participant