hugo: Consider empty strings in Param() as "not found"
I’m not totally sure about this, but @budparr has a theme where he in front matter (for archetype reasons) have:
- featured_image: ""
And when doing
{{ .Param "featured_image" }}
You will not get the desired effect of getting the image defined in site config. May be something to think about, but we should maybe fix archetypes to allow comments. Keep this as a reminder for a while …
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (13 by maintainers)
@moorereason Yes. I just tested that and it works.
A cleaner solution may be to not put empty strings into the params map when we read the front matter.