Skip to content

collections.EchoParam does not return boolean values #11498

@jmooring

Description

@jmooring
[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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions