This is my first post on this forum. Hello all.
I am using the Nederburg theme, which can be seen here.
I changed the code a little bit so that in the left top corner, instead of “Nederburg”, my logo shows up.
Locally (upon running
hugo server the logo is coming up fine, but when I build the website and push it to my repo, there’s nothing in the place of the logo on the live website.
For reference, my repo can be seen here, and the live website can be seen at quizinc(dot)in/quizink/ (can’t add more than 2 links in my first post).
Thanks in advance.
Images: Upon running locally, I get this
PS: I have removed the “The QuizInc Blog” in the actual website.
Your repository appears to contain the contents of hugo’s public folder after running
hugo. You are more likely to receive assistance on this forum when you share your entire project (the markdown, templates, etc.).
Looking at what you have shared I can tell you what is wrong. But without the rest of the project files I cannot tell you precisely why. In the furutre, when sharing a repository, share the entire project.
On your home page, served from https://quizinc.in/quizink/…
<img src="/img/portfolio/quizink.png" class="logo" alt="" />
src should be
On your codem, the logo is expected to be inside the img/portfolio folder, but it’s actually on the root of the quizink/img/ folder on your repository. So, just change the code to point to quizinkimg/ and you’re done.
<img src="/quizink/img/quizink.png" class="logo" alt="">
@jmooring just beat me by 1 minute
@jmooring and @sjardim thanks a lot for responses. It’s baffling to see how glaring a mistake this was on my part, but funnily enough, even after I fixed the code, GitHub Pages still can’t display the logo. Also, upon using inspect element, I see that the image cannot be found! This happens for both the
I would also like to add that using the code (I used to build the current website) on Netlify yields the logo properly (as can be seen here.
Also, the rest of the project files can be seen here.
I suspect you may have missed a few steps here:
For example, the baseurl in your repository is
My “main” website is a simple static website, with no site generator. And the one I’m having issues with are the project pages (which is of course a Hugo website).
Will following the steps mentioned above yield the expected results?
Thanks in advance.
edit: So I did as instructed in the documentation. Is my BaseURL correct now in config.toml?
the logo is still not visible.
Links: my hugo website repo is here
my “main” website is here
baseurl = "/quizink"
Sir, that’s not an URL. See URL at Wikipedia.
It should be
"https://quizinc.in/" if I’m not mistaken.
Thanks for the reply.
I’m using this page as a “subpage” or “project page”… Should the baseurl still be “quizinc(dot)in”, or should it be “quizinc(dot)in/quizink”? Once I keep it “quizinc(dot)in”, the CSS isn’t loaded.
In that case, yes. The second one.
Once I made this change, none of the CSS loads. I really cannot understand what is causing this problem.
baseurl = "quizinc.in/quizink"
Sir, again. That’s not an URL. It’s missing the
After a lot of efforts, it seems I have managed to fix it. Thanks a lot to @sephore, @jmooring, and sjardim (can’t mention >2 people in a comment) for helping me out. I just had to alter the params.Logo in config.toml quite a few times.
I have understood where I went wrong. Thank you for being so accommodating.
Uh, so in the end the problem was literally a
Just keep in mind that
img/portfolio/quizink.png isn’t the same as
/img/portfolio/quizink.png. And you wouldn’t need to use the
/quizink portion in the image path anyway, since the
baseURL is already pointing to that.
You might want to remove any extra
/quizink to avoid problems if you’re planning to change the
baseURL again in the future.
yes, I think I realised where I was going wrong. Thanks to you guys for helping me out. Appreciate it a lot!
I’ll keep in mind to avoid such errors/negligence in the future.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.