diff options
author | Daniel Sada Caraveo <danielsadac@gmail.com> | 2020-05-26 10:23:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 10:23:33 +0300 |
commit | 8e68d2e223c493064635b3f55dd3c9d306ccf832 (patch) | |
tree | 67accd644aee7b0b98149e5339bba251383f23d2 | |
parent | b3bebf2ae7f3c35f6fee5d23bb8013abca1a16ee (diff) |
Only add image to post if the image param exists.
-rw-r--r-- | layouts/_default/single.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 14b2c4f..d662f85 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -56,6 +56,7 @@ </div><!-- .post-meta-wrapper --> </div><!-- .entry-header-inner --> </header><!-- .entry-header --> + {{if .Params.Image }} <figure class="featured-media"> <div class="featured-media-inner section-inner medium"> <img width="1200" height="769" src="{{ .Params.Image | absURL }}" @@ -63,6 +64,7 @@ sizes="(max-width: 1200px) 100vw, 1200px"> </div><!-- .featured-media-inner --> </figure><!-- .featured-media --> + {{end}} <div class="post-inner thin "> <div class="entry-content"> {{ .Content }} @@ -99,4 +101,4 @@ </div><!-- .section-inner --> </article> -{{ end }}
\ No newline at end of file +{{ end }} |