Add coverCaption
This commit is contained in:
parent
bc1a483ef0
commit
0091c33d92
2 changed files with 18 additions and 6 deletions
|
@ -14,6 +14,16 @@
|
|||
<article>
|
||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||
|
||||
{{ 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 }}
|
||||
<hr />
|
||||
<aside id="toc">
|
||||
|
@ -23,10 +33,6 @@
|
|||
<hr />
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="{{ . | relURL }}" class="post-cover" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue