Move cover to partial; need to verify that old behavior still works as intended.

This commit is contained in:
Morgan Gangwere
2021-05-04 19:33:35 -07:00
parent 61980c49d1
commit 67bb5735de
4 changed files with 19 additions and 32 deletions

View File

@ -39,17 +39,8 @@
{{ end }}
{{- $cover := false -}}
{{- $autoCover := default $.Site.Params.autoCover false }}
{{- if $autoCover -}}
{{- $cover = .Resources.GetMatch "cover.*" -}}
{{- else if .Params.Cover -}}
{{- if .Resources.GetMatch .Params.Cover }}
{{ $cover = .Resources.GetMatch .Params.Cover }}
{{- end -}}
{{- end -}}
{{if $cover -}} <img src="{{ $cover.Permalink }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />{{- end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}