Hugo server renders CSS, hugo does not

I’m generating a fairly simple (just text-based pages) website using a couple of modifications on the PaperMod theme. Generating the website works beautifully when running hugo server, including all of the styling. However, when I run hugo, the website appears (both locally and on the server) without CSS. The final website is hosted (on BlueHost, in case that’s relevant) at elementalepistles.com/talk and my project repo is at https://github.com/designyouryou/write_talk/

This is the first time I’ve really used Hugo, but I’m fairly familiar with the basics of web development.

What I’ve tried

I’ve found a number of similar issues on this and other forums indicating it’s likely an issue with the baseURL. I have tried the following values for baseURL:

  • "",
  • "/"
  • "."

I have also tried each of the following as baseURL, with and without the final slashes and a www. subdomain:

  • "http://elementalepistles.com/"
  • "https://elementalepistles.com/"
  • "http://elementalepistles.com/talk/"
  • "http://elementalepistles.com/talk/"

I also get apparently identical functionality with and without the relativeURLs: true in my config.yml file:

At present, the hosted website (http://www.elementalepistles.com/talk) does not appear with CSS. The baseURL is specified as "http://elementalepistles.com/" However, when I inspect the code, the following line links (correctly) to all the CSS:

<link crossorigin="anonymous" href="./assets/css/stylesheet.77b947666a3da2636d5d50fcd3f1fd6608ff3a2d53bf27c31329b518d15cb430.css" integrity="sha256-d7lHZmo9omNtXVD80/H9Zgj/Oi1TvyfDEym1GNFctDA=" rel="preload stylesheet" as="style">

When I inspect this link, it appears to link correctly to the css file, which leads me to believe this may not actually be a baseURL error?

I would be quite grateful if someone is able to share some insights into what might be happening here. On the live site is the entire contents of the public folder in the repository (https://github.com/designyouryou/write_talk/).

When visiting the live site, open your browser’s dev tools and examine the messages displayed in the console.