Add coverCaption

This commit is contained in:
Djordje Atlialp 2021-01-10 16:58:03 +01:00
parent bc1a483ef0
commit 0091c33d92
2 changed files with 18 additions and 6 deletions

View file

@ -26,8 +26,14 @@
<div class="post-excerpt">{{ . }}</div>
{{ end }}
{{ with .Params.Cover }}
<img src="/{{ . }}" class="post-cover" />
{{ if .Params.Cover }}
<figure class="post-cover">
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title }}" />
{{ if .Params.CoverCaption }}
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{ end }}
</figure>
{{ end }}
{{- if .Params.toc }}