{{- $ph := cond (not $ph) (relURL "/img/speedy.png") $ph.RelPermalink }}
<img src="{{ $ph }}">
<div>
- {{ $caption := cond (not .Page.Params.caption) (cond (not $sp.Title) .Site.Title $sp.Title) .Page.Params.Caption }}
+ {{ $caption := cond (not .Page.Params.caption) (cond (not $sp.Params.caption) .Site.Title $sp.Params.caption) .Page.Params.caption }}
{{- if (eq (printf "%T" $caption) "string") }}
- {{- .Page.Params.caption -}}
+ {{- $caption -}}
{{- else }}
- {{- index .Page.Params.caption 0 }}
- {{- if (gt (len .Page.Params.caption) 1) }}
- {{- range after 1 .Page.Params.caption -}}
+ {{- index $caption 0 }}
+ {{- if (gt (len $caption) 1) }}
+ {{- range after 1 $caption -}}
<br>
{{ . }}
{{- end -}}