Skip to content

Commit

Permalink
BUG: fixed showOnTop (#541)
Browse files Browse the repository at this point in the history
* fixed `showOnTop`

* Use with statement

---------

Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
  • Loading branch information
Schefflera-Arboricola and stefanv authored Mar 12, 2024
1 parent 6d2e837 commit fded150
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/partials/posts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ <h5 class="subtitle">{{ .Params.Subtitle }}</h5>
<div class="post-meta">{{ partial "posts/meta.html" . }}</div>
<div class="post-content">
{{ with $featuredImage }}
{{ if .Params.showOnTop }}
<div class="post-featuredImage">
<img src="{{ .RelPermalink }}" {{ if .Params.description }}alt="{{ .Params.description }}"{{ end }}/>
<img src="{{ .RelPermalink }}" {{ with .Params.description }}alt="{{ . }}"{{ end }}/>
</div>
{{ end }}
{{ end }}
{{ .Content }}
{{ partial "posts/comments.html" .}}
</div>
Expand Down

0 comments on commit fded150

Please sign in to comment.