Hello! I am new to Hugo and trying it out to build my simple photography blog. On the homepage, I would like to render a simple masonry layout with 50 images or so. I have the following shortcode here running and rendering the images just fine:
In my static/images/homepage folder, I have the image file names set to JSA_1.jpg, JSA_2.jpg … etc all the way to JSA_50.jpg. In my macOS folder view, when sorted ASC by file name, I clearly get the sort I expect - _1 to _50.jpg. However when this page loads, I’m getting a very weird order:
JSA_1, JSA_10, _100, _101 … all the way to _109 then I get _11 … then _111 through _119 then _12
It doesn’t really make sense, and I hope I’m missing something very obvious here.
Hi, there might be some other solution, but as a workaround you could prefix the one- and two-digit numbers with zeros, like JSA_001, and so on. Some sorting algorithms prefer it that way.