Fix support for site config featured image (#489) (#490)

* Unintentionally caused by #474
This commit is contained in:
Troy Lindsay 2022-01-12 11:16:02 -06:00 committed by GitHub
parent 3789b8edae
commit 36c029abb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,13 @@
{{ end }}
{{ end }}
{{ if not $linkToCover }}
{{/* Use the value from the site config parameter if present */}}
{{ with .Site.Params.featured_image }}
{{ $linkToCover = . }}
{{ end }}
{{ end }}
{{/* return either a permalink, or an empty string. Note that partials can only have a single
return statement, so this needs to be at the end of the partial (and not in the if block) */}}
{{ return $linkToCover }}