Issue 1
I have an odd issue when I last published a new Hugo based website.
@jmooring help me with that last time.
The problem was the Case Sensitive filename of an image file.
-![CE Logo](/svg/ce-logo.svg)
+![CE Logo](/svg/CE-logo.svg)
The problem is, that in Windows and macOS, this hasn’t made any difference (and I think it shall, but this system is not so strict on being case sensitive) and all builds working fine locally, then when tried to push to Netlify (or right now tried to run locally on Ubuntu) the build failing as file doesn’t exist as I am referring to file in small letters and for with capitals.
Issue 2
Now, I got another website when an issue is related.
Again, on windows and macOS working fine but on Netlify and Ubuntu failing.
The issue is below part in my shortcode
{{ $isJPG := eq (path.Ext $ftimgsrc) ".jpg" }}
but it is not an issue of the shortcode, is an issue of the environment.
In windows and macOS when I request to get an extension by path.Ext
for file 03-2015-08-07-18.22.19.jpg
I will get .jpg
but in Linux environment is not that case and likely extension will be after the first occurrence of the dot.
For 03-2015-08-07-18.22.19.jpg
will be likely .22.19.jpg
It will be nice if when running hugo serve
to behave in the same manners in all systems (preferably in linux), so this will help in finding issues much quicker.
Similar with FILE.jpg
and file.jpg
to be treated separately, at least by Hugo. It’s like bypassing the environment, and not quite sure it’s even possible, but think it’s worth discussing.
Issue 3
Also, what I noticed is the issue with files with the following filename 20180319-070917-017-13-min.jpg
Example
"/featuredImages/2018/03/20180319-070917-017-13-min.jpg"
the file exists and there is nothing wrong with it, but for some reason causing the failure of shortcodes.
If I will rename this file to something else (doesn’t matter what), that doesn’t start with YYYYMMDD it will work well without failure.
There may be a case where, if filename is in format YYYYMMDD-HHMMSS etc. Hugo is modifying a path for that.
Unable to confirm, as failure doesn’t show too many details and I renamed all problematic files.
Issue 4
Also, this happening as well #7686
/featuredImages/2019/05/Lot_balonem_Garnki-Kosciernica_24-05-2019-113-min.jpg
File exist in /featuredImages/2019/05/
-rw-r--r--@ 1 dariusz staff 362131 7 Dec 22:50 Lot_balonem_Garnki-Kosciernica_24-05-2019-113-min.jpg
-rw-r--r-- 1 dariusz staff 180194 8 Dec 13:13 Lot_balonem_Garnki-Kosciernica_24-05-2019-113-min.webp
but as I noticed, this file is landing in /featuredimages/ folder not /featuredImages/ (look on capital letter in patch)
when I rename this file to something else, it lands in right folder.
ps. there is no /featuredimage/ folder or any file refering to it with letter
i
not been in caps.
Quite a bit of issue and worth splitting this into 2 or 3 issues?
Please advise if worth raising an issue on GitHub?