Closed delize closed 9 months ago
What does work is inputting:
/blog/favicon.ico
However, if the base url includes a subfolder, this is slightly confusing, as the subfolder in the favicon yaml file should not need /blog/
.
I may be wrong, but, after reading: https://gohugobrasil.netlify.app/functions/absurl/
I believe that the line above needs to be changed from .
to . | relURL
I may be wrong, but, after reading: https://gohugobrasil.netlify.app/functions/absurl/
I believe that the line above needs to be changed from
.
to. | relURL
Hi @delize, thanks for pointing this out. Would you like to create a pull request for this issue?
PR opened up above @CaiJimmy
I do have a FR issue that I have been meaning to submit, but, will get around to that when I can. I haven't found a good implementation of the FR into the blog when trying to accomplish it yet.
What happened?
When trying to use a baseurl that includes a subfolder, for example:
baseurl: http://localhost/blog/
And setting
favicon: /favicon.ico
, the favicon fails to load on any page, as it isn't following the subfolder within the base url.Now, if we alter
favicon: /favicon.ico
tofavicon: favicon.ico
this now works for the main page ofhttp:/localhost:1313/blog
.However, once we go to a blog post (for example, the ones included in the example config) or any page that isn't the root post.
The favicon fails to load again.
I believe the line items https://github.com/CaiJimmy/hugo-theme-stack/blob/21da06e448fe466ef0a03d1c717847f0eb0049fe/layouts/partials/head/head.html#L21-L23 Needs improvement, but, I am not sure what as I am not super familiar with Hugo (I'm currently transitioning from Jekyll, and thought your template was really nice. Great job!) If I modify this line and statically list
/blog/favicon.ico
, everything works as intended.This is when the theme is loaded as a submodule in hugo.
Hugo version
v0.121.1-00b46fed8e47f7bb0a85d7cfc2d9f1356379b740+extended darwin/arm64 BuildDate=2023-12-08T08:47:45Z VendorInfo=brew
Theme version
v3.21.0
What browsers are you seeing the problem on?
Chrome
More information about the browser
macOS Sonoma 14
Relevant log output
Link to Minimal Reproducible Example
N/A - repo is currently private while I try and transfer over posts from jekyll