hugo-modules
hugo-modules copied to clipboard
img: Use of RelPermalink URLs breaks 404 page on Cloudflare Pages
UPDATE -- You can ignore this
I didn't realize it, but setting the Hugo parameter relativeURLs to false fixes this behavior ...
This is an edge case, and I can fix it by creating my own partial from yours, but:
- Cloudflare Pages doesn't rewrite the 404 page URL when it hits a not found case.
- I am using img partial with my page header logo image
- If the 404 happens to be not a top level directory -- for example mysite.com/xx/yy -- the RelPermalinks fail because they are based on the location of 404.html rather than the url that's causing the 404
Suggested solution: another parameter that causes img to use Permalink rather than RelPermalink, which I'd use in my page header and if I used any images in 404.html
https://craftycto.com is the site. PaperModX theme.