Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Severin <severinderek@gmail.com>2019-02-10 10:08:49 +0300
committerDerek Severin <severinderek@gmail.com>2019-02-10 10:08:49 +0300
commitf764775985b446655701ed740c116d598980cb77 (patch)
tree7aee8a77962ca164549fa6b2280e1aec9c5585c2 /layouts/partials/gallery.html
parent09da20da8cad89350be6179c284c17d8a1f84d6f (diff)
Image gallery: fixed directory check & added params in 'single.html' call to partial
Diffstat (limited to 'layouts/partials/gallery.html')
-rw-r--r--layouts/partials/gallery.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/partials/gallery.html b/layouts/partials/gallery.html
index 72e11d2..6c7fc4b 100644
--- a/layouts/partials/gallery.html
+++ b/layouts/partials/gallery.html
@@ -46,8 +46,9 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
{{ $.page.Scratch.Set "dirFiles" (print "/content/" $tmpDir "/") }}
{{- end -}}
{{- $dir := $.page.Scratch.Get "dirURL" }}
- {{ if (fileExists $dir) -}}
- {{- $files := readDir ($.page.Scratch.Get "dirFiles" ) }}
+ {{- $dirFiles := $.page.Scratch.Get "dirFiles" }}
+ {{ if (fileExists $dirFiles) -}}
+ {{- $files := readDir ($dirFiles ) }}
{{- range $files -}}
<!-- skip files that aren't images, or that inlcude the thumb suffix in their name -->