The following should work (but judging by the history of this thread it does not):
Use with it will do the job of checking if the info is set. Now if it’s an empty string or false value, it will skip. It also shift context, so on success the . now contains your .Params.info
The second test ensure that .Params.info which now is not in the . does not return an whitespace which with will consider truthy.
{{ with .Params.info }}
{{ if ne . " " }}
{{T "Info"}}: {{ . }}
{{end}}
{{ end }}
If the above does not work I’m out of option without seeing the data you’re trying to process and your repo.
I didn’t know the two are different. I just wanted to avoid the empty values from appearing in my content unless they have values in them. E.g If location:"" don’t show vs if location: Tokyo then show…