But when I use the hugo command (or hugo -t book) the styles do not apply and URLs to articles are wrong.
What am I missing? I thought it was a GitHub build issue until I noticed it also happens locally on my drive.
Here’s the repo and branch I’m trying: https://github.com/ZQ-PSK/ssg/tree/build-as-static
Looking at the file in a browser is not the same as looking at the content in a webserver. It looks like the CSS is not being loaded in because there isn’t a server running to pull them in.
It didn’t work on GitHub’s webserver either, I was getting the same results (at least visually).
I resolved the problem by removing the “baseURL” variable from the config and adding this instead:
relativeURLs = true
I suppose this may be a theme-specific issue, but I also tried the techdoc theme and got a similar result - in that case, the styles loaded, but the URLs to articles were still wrong. The config above fixed them.