formatted for web testing
[kengrimes.com/theme.git] / layouts / _default / baseof.html
index 5455891..1f102a4 100644 (file)
       {{- $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 -}}