Skip to content

Commit

Permalink
feat: add displayPostDescription option
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Aug 21, 2019
1 parent 56971af commit af94d6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/partials/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ <h1 class="post-title">{{ .Title }}</h1>
<div class="post-subtitle">{{ . | markdownify | safeHTML }}</div>
{{ end }}

{{ with .Params.description }}
<div class="post-description">{{ . | markdownify | safeHTML }}</div>
{{ if .Site.Params.displayPostDescription }}
{{ with .Params.description }}
<div class="post-description">{{ . | markdownify | safeHTML }}</div>
{{ end }}
{{ end }}

{{ if .Params.meta | default .Site.Params.enablePostMeta }}
Expand Down

0 comments on commit af94d6d

Please sign in to comment.