{{ $mode := .Get 0 }}{{ $opt1 := .Get 1 }}{{ $opt2 := .Get 2 }} {{ $img_on := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-on-icon_smal.png" )}} {{ $img_off := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-off-icon_smal.png" )}} {{ if eq $mode "on" }} On {{ else if eq $mode "off"}} Off {{ else if eq $mode "imgping" }} {{ with $opt1 }} {{ $id := md5 $opt1 }} {{ if eq $opt2 "on" }} On {{ else }} Off {{ end }} {{ else }} imgping [URL to image] [default on/off] {{ end }} {{ else }} ??? {{ end }}