Can't generate static site properly (book theme)

I’m trying to prepare a personal page to deploy to GitHub pages.
I’m using the “book” theme and it works when I use the hugo server command:

But when I use the hugo command (or hugo -t book) the styles do not apply and URLs to articles are wrong.
Screenshot from 2020-05-02 17-30-13
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:

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.

1 Like

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.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.