Relative path in Quire #59
-
I'm having trouble understanding how the relative path for imageDir is working. Specifically, I am trying to use the Splash page on some internal (ie. subdirectory) pages. As a result, the background-url set in css on the hero image do not render, since they are using /img/. I tried playing around with various settings, but I do not seem to be able to deploy to github and fix these urls I've noticed that the bin/deploy.sh script does pass the github parameter, but even with my settings below, I am not seeing full urls: # hugo --config=config.yml,config/environments/github.yml # my config/environments/github.yml Any help is appreciated Darcy |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @1000camels, yes unfortunately we've seen this before (with @hlj24 most recently) and I haven't been able to create and test a stable fix for it yet. The primary issue is that Hugo's relURL and absURL functions, and their relativeURLs and canonifyURLs config settings are for some reason only applied in certain contextual situations. For instance, they have the desired effect when used on a URL in an Until Hugo makes a change or we can work out something stable in Quire, I think this should probably fix it for you. In
Since you have a baseURL set in the github.yml config, if you update the code to this it will prepend the full URL and the background image should load:
Let us know if that works! 🤞 |
Beta Was this translation helpful? Give feedback.
Hi @1000camels, yes unfortunately we've seen this before (with @hlj24 most recently) and I haven't been able to create and test a stable fix for it yet.
The primary issue is that Hugo's relURL and absURL functions, and their relativeURLs and canonifyURLs config settings are for some reason only applied in certain contextual situations. For instance, they have the desired effect when used on a URL in an
<a>
tag but not when used on a URL in astyle
attribute, as they are for the background images on splash pages.Until Hugo makes a change or we can work out something stable in Quire, I think this should probably fix it for you.
In
/themes/quire-starter-theme/layouts/splash/single.html
on o…