Note that default will not do what I want because I do not want a value of false in .Page.Params.omitFromSitemap overridden. From what I recall, default overrides based on ‘falsyness’ not only on nil.
If I’m wrong I’ll have to figure out why I got that impression, since it seemed to the behavior with templates I’ve written.
{{ $omitFromSitemap := or (.Param "omitFromSitemap") false }}
We have to use or with a final false argument to defend against the absence of either page or site parameters. Otherwise we’d get nil instead of false.
Thank you. I forgot about .Param. I got out of the habit of using it when I was doing partials that I designed for one to also call from shortcodes. In older versions of Hugo site (and things like .Param that used it implicity) didn’t work in shortcodes.