This question is somehow related to previous one.
Gallery page
Markdown of gallery
I have a shortcode gallery on my page and it doesn’t show up pictures, because of incorrect path.
GET
bla-bla-bla/img/gal1/1961.jpg
[HTTP/1.1 404 Not Found 0ms]
Here is a gallery code snippet:
<div class="gallery">
{{ $path := print "static/img/" (.Get "src") }}
{{ $url := print (.Get "src") }}
{{ range (readDir $path) }}
{{/* don't try to display directories */}}
{{ if and (ne .Name ".DS_Store") (not .IsDir) }}
{{ $src := print "/img" "/" $url "/" .Name }}
{{/*
troubleshoot the $src variable as needed
<!-- <p>{{ $src }}</p> -->
*/}}
<a data-fancybox="gallery" href="{{ $src }}">
<img src="{{ $src }}"> <br/>
</a>
{{ end }}
{{ end }}
</div>
Mr @jmooring suggested in the previous post following construction:
src="{{ `js/lazy-load.js` | relLangURL }}"
I suspect that it should be applied somewhere here:
{{ $path := print "static/img/" (.Get "src")
But due to my “awesome” brain and luck of knowledge i can’t figure out how to do this to make things rollin’.