In system-software-from-developer-apple-inc.-has-been-updated/index.md I reference the above image with .
I have found consistently when I have “freshly” loaded my home page if I click on the link to the content above, the image doesn’t load because the url to the image is relative to my site’s root rather than the content page. However, if I refresh the content page (or visit it directly by copy/pasting the url), the image url is correct and the image loads.
Just reviewing the Page Bundles docs as I write this: is it the case that page resources must be in the same directory as the page itself? That is, in my case the images for my post cannot be in the images/ subdirectory, rather, they must be in the same directory as index.md?
@cshoredaniel - I don’t understand. When I navigate to the post, the value of <base href="{{ .Permalink }}"> updates to the URL of the post, which is what the base URL should be for the relative path images/combined.png that is in the post:
@Mattt Sorry, I was confusing what you had with the usual of setting of <base href="{{ site.baseurl }}">.
I wonder if this is actually a browser issue (base href is usually the same for pages in the same site or sub-site, not different every page, AIUI). I don’t see anything in the spec that would suggest it is supposed to matter, but I suspect this is a rather unique way of using the <base> element (but I am not a frontend developer).
Hopefully someone can chime in who notices something I missed, or has a deeper knowledge of the spec and expected behaviour.
I’ve seen theme authors use the base element in an attempt to handle sites that are served from a subdirectory. But with the advent of link and render hooks, setting a base element causes more problems than it solves.
@cshoredaniel@jmooring - thanks for your insight on this one. Removing the <base> tag seems to have done the trick without any negative side effects. I think I’ll leave it at that.
@jmooring - the behaviour I would see is that the image would load after I reload the page. If I went back to my home page, reloaded the home page, then visited the post again, I’d see a broken link to the image until I refreshed the post.