I want my site to render differently locally but I’m having trouble getting conditions to work.
If I use this:
{{ if .Site.IsServer }}
do something
{{ end }}
I get this error:
ERROR 2018/07/27 17:19:34 Error while rendering “home”: template: /index.html:9:12: executing “/index.html” at <.Site.IsServer>: can’t evaluate field IsServer in type *hugolib.SiteInfo
I have also tried
{{ if eq .Site.BaseURL “http://localhost:3000” }} <<< always resolves false even if {{ .Site.BaseURL }} prints “http://localhost:3000”
My Hugo version: Hugo Static Site Generator v0.44/extended darwin/amd64 BuildDate: unknown