Skip to content

Commit

Permalink
Fix support for site config featured image (theNewDynamic#489)
Browse files Browse the repository at this point in the history
* Unintentionally caused by theNewDynamic#474
  • Loading branch information
tlindsay42 committed Jan 12, 2022
1 parent 3789b8e commit ac4dd25
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions layouts/partials/func/GetFeaturedImage.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit ac4dd25

Please sign in to comment.