Fix crash on missing hero
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -3,13 +3,15 @@
|
||||
{{ partial "components/meta/index.html" . }}
|
||||
|
||||
{{ $hero := partial "components/hero/process.html" .Params.hero }}
|
||||
{{ $data := partial "components/image/process.html" (dict "page" .Page "src" $hero.src) }}
|
||||
{{ if $hero.src }}
|
||||
{{ $data := partial "components/image/process.html" (dict "page" .Page "src" $hero.src) }}
|
||||
|
||||
{{ $final := merge $data $hero }}
|
||||
{{ if $hero.exif }}
|
||||
{{ $caption := partial "components/image/exif.html" $data.original }}
|
||||
{{ $final = merge $final (dict "caption" $caption) }}
|
||||
{{ $final := merge $data $hero }}
|
||||
{{ if $hero.exif }}
|
||||
{{ $caption := partial "components/image/exif.html" $data.original }}
|
||||
{{ $final = merge $final (dict "caption" $caption) }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "components/image/index.html" $final }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "components/image/index.html" $final }}
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user