diff --git a/config.yaml b/config.yaml index df6cc141ad589f0af4669068992d1278ff387a74..c634a5e60c72c77fa03062fdaa2189a59ab1ddab 100644 --- a/config.yaml +++ b/config.yaml @@ -7,6 +7,7 @@ params: breadcrumb: position: hero-start # hero-start | hero-end | after-hero posts: + default_image: false index: show_categories: false show_author: false diff --git a/layouts/partials/posts/post.html b/layouts/partials/posts/post.html index 6430cdc42d7923988687eff927169f52298af61d..df3fbd9a69246688e9ee3edf6383dfe4fcf6205d 100644 --- a/layouts/partials/posts/post.html +++ b/layouts/partials/posts/post.html @@ -38,16 +38,18 @@ </div> - <div class="media"> - {{- if .Params.image -}} + {{- if .Params.image -}} + <div class="media"> {{- partial "commons/image.html" (dict "image" .Params.image "sizes" site.Params.image_sizes.sections.posts.item ) -}} - {{- else -}} + </div> + {{- else if site.Params.posts.default_image -}} + <div class="media"> {{- partial "commons/image-default.html" -}} - {{- end -}} - </div> + </div> + {{- end -}} </article> {{ end }} \ No newline at end of file