diff options
| author | tdro <tdro@noreply.example.com> | 2024-09-20 00:00:00 +0000 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2024-09-20 00:00:00 +0000 |
| commit | 66594c39c53b5e8def44488aeffc3ca6d5679c32 (patch) | |
| tree | d0ff90fe110026c3dbfdf91c717f55604bbd4c10 | |
| parent | 60151f1f2f5f4a81122bccc4d833144caffb3df6 (diff) | |
| download | canory-66594c39c53b5e8def44488aeffc3ca6d5679c32.tar.gz canory-66594c39c53b5e8def44488aeffc3ca6d5679c32.tar.bz2 canory-66594c39c53b5e8def44488aeffc3ca6d5679c32.zip | |
themes/default/layouts/partials/gallery: Avoid nil value
| -rw-r--r-- | themes/default/layouts/partials/gallery.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/themes/default/layouts/partials/gallery.html b/themes/default/layouts/partials/gallery.html index 135aa14..61d326d 100644 --- a/themes/default/layouts/partials/gallery.html +++ b/themes/default/layouts/partials/gallery.html @@ -3,8 +3,10 @@ <gallery-images> <h1>Gallery</h1> <aside> - {{- if fileExists $gallery -}} - {{- (resources.Get $gallery).Content | safeHTML -}} + {{- with fileExists $gallery -}} + {{- with resources.Get $gallery -}} + {{- .Content | safeHTML -}} + {{- end -}} {{- else -}} <footer> <code>No items found!</code> |
