|
|
|
@ -20,7 +20,7 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
|
|
|
|
|
{{- if and $isimg (and (not $isthumb) (not $islarge)) }}
|
|
|
|
|
{{- $caption := .Name | replaceRE "\\..*" "" | humanize }}<!-- humanized filename without extension -->
|
|
|
|
|
{{- $linkURL := print $baseURL ($.Get "dir") "/" .Name | absURL }}<!-- absolute URL to hi-res image -->
|
|
|
|
|
{{- $thumb := .Name | replaceRE "(\\.)" ($thumbext | printf "%s.") }}<!-- filename of thumbnail image -->
|
|
|
|
|
{{- $thumb := .Name | replaceRE "(\\.)(gif|jpg|jpeg|tiff|png|bmp)$" ($thumbext | printf "%s.$2") }}<!-- filename of thumbnail image -->
|
|
|
|
|
{{- $thumbexists := where $files "Name" $thumb }}<!-- does a thumbnail image exist? -->
|
|
|
|
|
{{- $thumbURL := print $baseURL ($.Get "dir") "/" $thumb | absURL }}<!-- absolute URL to thumbnail image -->
|
|
|
|
|
{{- $large := .Name | replaceRE "(\\.)" ($largeext | printf "%s.") }}<!-- filename of thumbnail image -->
|
|
|
|
|