I have a github repo that I use to continuously deploy my site to Netlify. The current site with my current theme builds and deploys just fine. However, I have a git branch where I'm trying to get a new theme implemented that I intend to switch to.
This new branch renders the theme just fine locally. When I push to github and the Netlify build is triggered, the site builds with no errors. However, the output is plain HTML with no discernible styling. See here: https://vigorous-curie-5890bb.netlify.com/
When I drag and drop /public/ into Netlify, it builds with no errors but correctly displays styling.
Where am I going wrong? I have tried numerous settings in the netlify.toml and config.toml. I am using Hugo version 0.60.1. Any pointers would be helpful, thank you!
The links to the css aren't incorrect. Looks like they're missing a '/'. https://vigorous-curie-5890bb.netlify.comcss/main.css should be https://vigorous-curie-5890bb.netlify.com/css/main.css
At a quick glance, that Alison Hill article looks like it's got your answer.
Specifically the bit about using the relURL function
Bottom line? If your theme uses relURL or absURL to link to site resources like CSS, JavaScript, or static images, then whether or not you include a trailing slash in your baseurl should not matter at all.
And here is some tough love about your theme: if the most recent version does still require the trailing slash in the baseurl to “work” out of the box, I would seriously consider switching themes. This is a pretty good “canary in the coal mine” test regarding how up-to-date the theme author is, and how well the theme you have chosen adheres to Hugo templating best practices. If you are having pain with this now, it is likely not the only thing that will be painful about working with your theme.
I just added the trailing slashes into that html blob you linked - site deploys perfectly now! Thank you for your help.
My next step will be to determine if my fix is just a quick fix or if I need to replace these baseURL references with relURL references - but for now I'm good. Thanks!