I am having a problem with my Hugo instance where the site views properly when running ‘hugo server’ locally and then breaks when I publish to my website. The break is that it looks like the css is not referenced properly. Navigation buttons are huge, the dark/light button does not toggle, and no style shown.
I think it might have something to do with my baseURL and the fact that I do not have my hugo published content in the root of my website…
https://www.mywebsite.com/blog33
This is what I have in my hugo.yml… (where mywebsite is replaced with my real domain name
baseURL: "https://www.mywebsite.com/blog33"
languageCode: en-us
title: mywebsite blog
theme: "PaperMod"
I am running ‘hugo’ and then copying the ‘public’ directory content into my ‘blog33’ directory. So that when folks visit the blog33 directory in the browser URL they see the blog.
supposedly you are right in some way - if your site is published to a subfolder you will have to use the right templating to generate proper urls for the CSS.
The exampleSite of the PaperMod has no problems with being generated for a subfolder.
You are doing something unexpected/wrong here. Without your sources it would be just guessing.
Thanks. I meant to write the full url there but the link feature kept taking the text and making it a link.
So, yes I do want the blog to be visible at…
Thank you. I will get onto getting the instance code into a repo.
In the meantime I tried switching the theme to ‘hugo-paper’ and it does work after being uploaded to the website. So it could be something with the ‘PaperMod’ theme or missing some extra configuration to it.
That little fix there, adding a config setting for the params/assets/disableFingerprinting, did allow the css to show properly in a browser on my website’s server. So there is something there with a ‘deprecated’ setting and such, but for now my issue is resolved. I am going to add a note to the GH issue for that so that there is another datapoint that this was the same/similar.