diff --git a/layouts/partials/image.html b/layouts/partials/image.html index 80e510b5..a6478e99 100644 --- a/layouts/partials/image.html +++ b/layouts/partials/image.html @@ -1,5 +1,5 @@ -{{ if .caption }} +{{- if or (or .title .caption) .attr -}} {{ end }} @@ -90,7 +90,19 @@ -{{ if .caption }} - {{ .page.RenderString .caption }} - +{{- if or (or .title .caption) .attr -}} + + {{ with .title -}} + {{ . }} + {{- end -}} + {{- if or .caption .attr -}} + {{- .caption | markdownify -}} + {{- with .attrlink }} + + {{- end -}} + {{- .attr | markdownify -}} + {{- if .attrlink }}{{ end }} + {{- end }} + + {{ end }} \ No newline at end of file
+ {{- .caption | markdownify -}} + {{- with .attrlink }} + + {{- end -}} + {{- .attr | markdownify -}} + {{- if .attrlink }}{{ end }}