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

collections.EchoParam does not return boolean values #11498

Closed
jmooring opened this issue Sep 26, 2023 · 1 comment · Fixed by #11503
Closed

collections.EchoParam does not return boolean values #11498

jmooring opened this issue Sep 26, 2023 · 1 comment · Fixed by #11503

Comments

@jmooring
Copy link
Member

[params.footer]
string = 'foo'
int = 42
float = 3.1415
bool = true
{{ echoParam .Site.Params.footer "string" }} --> foo (string)
{{ echoParam .Site.Params.footer "int" }}    --> 42 (int64)
{{ echoParam .Site.Params.footer "float" }}  --> 3.1415 (float64)
{{ echoParam .Site.Params.footer "bool" }}   --> "" (string)

...or deprecate the function. I'm not sure why we need three ways to do the same thing:

{{ site.Params.footer.key }}
{{ index site.Params.footer "key" }}
{{ echoParam .Site.Params.footer "key" }}  <-- and with this one you need to lowercase the key, just like isset
@github-actions
Copy link

This issue 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 Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant