Closed rootwork closed 2 years ago
Assigning @onweru as I'm guessing this is your area.
Update: This happens with rootURL
used in the search feature as well, which is basically defined the same way (except no trailing slash). The search scripts can't access index.json
, because it looks for it in <rootdomain>/index.json
instead of <baseURL-including-subdir>/index.json
.
I think both of these should be adapted to use .SiteBaseURL
to allow for installs in subdirectories.
I now have a PR for this in #324, so requesting @onweru's review there instead.
I have checked all the prerequisites below and I'm yet experiencing a problem
Describe the bug
I was trying to debug an issue where the
link.svg
images in hovered sub-heading permalinks were not showing up for me in situations where the site was in a subdirectory (e.g. a GitHub Pages site likeusername.github.io/projectname
).When I looked at how the path to that file is constructed, it's
${parentURL}${iconsPath}link.svg
. I knowiconsPath
is fine because my "light switch" mode icons show up fine. So then I looked upparentURL
:The comment implies that this is being read from Hugo config, but it's not -- it's constructed just looking at what's in the browser window, and it only reads the domain name, not subdir(s). Shouldn't this just use Hugo's own
.Site.BaseURL
value?I can make a PR for this, but I wasn't sure how else
parentURL
might be getting used, or what assumptions there are about it.