- {{- partial "post_thumbnail.html" (dict "page" . ) }} + {{- partial "post_thumbnail.html" (dict "page" .) }} {{- partial "post_meta.html" (dict "dot" . "class" "mb") }} {{ .Title }} {{- partial "post_toc.html" . }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index fef0dc8..20eaf02 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,5 +1,5 @@ - {{- partial "post_thumbnail.html" (dict "page" . ) }} + {{- partial "post_thumbnail.html" (dict "page" . "link" .RelPermalink) }} {{ .Title }} {{- .Summary }} {{- partial "post_meta.html" (dict "dot" . "class" "mt tar") }} diff --git a/layouts/partials/post_thumbnail.html b/layouts/partials/post_thumbnail.html index d2528bd..36899bc 100644 --- a/layouts/partials/post_thumbnail.html +++ b/layouts/partials/post_thumbnail.html @@ -1,6 +1,13 @@ -{{- $img := ( .page.Resources.ByType "image").GetMatch "thumbnail.*" }} +{{- $img := (.page.Resources.ByType "image").GetMatch "thumbnail.*" }} +{{- $link := .link }} {{- with $img }} - + {{- with $link }} + + + + {{- else }} + + {{- end }} {{- end }} \ No newline at end of file
- {{- partial "post_thumbnail.html" (dict "page" . ) }} + {{- partial "post_thumbnail.html" (dict "page" . "link" .RelPermalink) }} {{ .Title }} {{- .Summary }} {{- partial "post_meta.html" (dict "dot" . "class" "mt tar") }} diff --git a/layouts/partials/post_thumbnail.html b/layouts/partials/post_thumbnail.html index d2528bd..36899bc 100644 --- a/layouts/partials/post_thumbnail.html +++ b/layouts/partials/post_thumbnail.html @@ -1,6 +1,13 @@ -{{- $img := ( .page.Resources.ByType "image").GetMatch "thumbnail.*" }} +{{- $img := (.page.Resources.ByType "image").GetMatch "thumbnail.*" }} +{{- $link := .link }} {{- with $img }} - + {{- with $link }} + + + + {{- else }} + + {{- end }} {{- end }} \ No newline at end of file