Skip to content

Commit

Permalink
Do not render article-meta figure if there is nothing to display
Browse files Browse the repository at this point in the history
  • Loading branch information
pomeloy authored Jan 19, 2024
1 parent c8f648d commit 183aeff
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
{{ .Title | emojify }}
</h1>
<div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400">
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div>
{{ if or
(.Params.showDate | default (.Site.Params.article.showDate | default true))
(and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial "functions/date.html" .Date) (partial "functions/date.html" .Lastmod)))
(and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0))
(and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0))
(.Params.showEdit | default (.Site.Params.article.showEdit | default false))
}}
<div class="mb-12 mt-8 text-base text-neutral-500 print:hidden dark:text-neutral-400">
{{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div>
{{ end }}
ß
{{ with $feature }}
<div class="prose">
Expand Down

0 comments on commit 183aeff

Please sign in to comment.