Skip to content

Commit fded150

Browse files
BUG: fixed showOnTop (#541)
* fixed `showOnTop` * Use with statement --------- Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
1 parent 6d2e837 commit fded150

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layouts/partials/posts/post.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ <h5 class="subtitle">{{ .Params.Subtitle }}</h5>
99
<div class="post-meta">{{ partial "posts/meta.html" . }}</div>
1010
<div class="post-content">
1111
{{ with $featuredImage }}
12+
{{ if .Params.showOnTop }}
1213
<div class="post-featuredImage">
13-
<img src="{{ .RelPermalink }}" {{ if .Params.description }}alt="{{ .Params.description }}"{{ end }}/>
14+
<img src="{{ .RelPermalink }}" {{ with .Params.description }}alt="{{ . }}"{{ end }}/>
1415
</div>
1516
{{ end }}
17+
{{ end }}
1618
{{ .Content }}
1719
{{ partial "posts/comments.html" .}}
1820
</div>

0 commit comments

Comments
 (0)