Skip to content

Commit

Permalink
Changed deprecated .Dir - FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
2-REC committed Jul 16, 2019
1 parent fb0476d commit 1053912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
{{- .page.Scratch.Add "figurecount" 1 }}
{{ $baseURL := .page.Site.BaseURL }}
<div class="gallery caption-position-{{ with .caption_position | default "bottom" }}{{.}}{{end}} caption-effect-{{ with .caption_effect | default "slide" }}{{.}}{{end}} hover-effect-{{ with .hover_effect | default "zoom" }}{{.}}{{end}} {{ if ne (.hover_transition) "none" }}hover-transition{{end}}" itemscope itemtype="https://schema.org/ImageGallery">
{{- with .File.dir -}}
{{- with .dir -}}
<!-- If a directory was specified, generate figures for all of the images in the directory -->
{{- if eq $.static "true" -}}
{{ $.page.Scratch.Set "dirURL" (print .) }}
{{ $.page.Scratch.Set "dirFiles" (print "/static/" .) }}
{{- else -}}
{{- $tmpDir := print (replace $.page.Dir "\\" "/") "/" . }}
{{- $tmpDir := print (replace $.page.File.Dir "\\" "/") "/" . }}
{{ $.page.Scratch.Set "dirURL" $tmpDir }}
{{ $.page.Scratch.Set "dirFiles" (print "/content/" $tmpDir "/") }}
{{- end -}}
Expand Down

0 comments on commit 1053912

Please sign in to comment.