diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 42d919c..4830b53 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,6 +2,7 @@
+ {{- partial "post_thumbnail.html" (dict "page" . ) }}

{{ .Title }}

{{ .Content }}
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 48c6f7b..6381dd3 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,4 +1,5 @@
+ {{- partial "post_thumbnail.html" (dict "page" . ) }}

{{ .Title }}

{{- .Summary }}
diff --git a/layouts/partials/post_thumbnail.html b/layouts/partials/post_thumbnail.html new file mode 100644 index 0000000..d2528bd --- /dev/null +++ b/layouts/partials/post_thumbnail.html @@ -0,0 +1,6 @@ +{{- $img := ( .page.Resources.ByType "image").GetMatch "thumbnail.*" }} +{{- with $img }} +
+ {{ $img.Title }} +
+{{- end }} \ No newline at end of file