Static pages don't pick up styling

  • MacOS Mojave 10.14.5
  • Hugo Static Site Generator v0.55.6/extended darwin/amd64 BuildDate: unknown

Two themes in question:

Generate a public folder:
$ hugo

I simple double-click on the “index.html” file to view locally in the browser, page shows up but
all the styling is gone.

Everything works perfectly while developing:
$ hugo server -D


$ hugo server

  • I see references to potential issues when using SCSS but it looks like
    the extended version is installed by default, so not sure if this is an issue.
  • Browser caches are refreshed.

Any thoughts?

Thanks, TH.

When running hugo server, you’re viewing your site as it would be served by a web server, since hugo server is, well, a web server :slightly_smiling_face:

When running hugo, then viewing a generated html file, you’re viewing your site from your local hard disk. Which is a different thing.

OH, so this is the expected behavior?
Well, lesson learned here, thank @zwbetz, very helpful.
Humble thanks for the quick reply too.!

Depending on how your paths are setup, yes.

If you really want your site to work from local disk, then you’ll need to set relativeURLs to true, and uglyURLs to true (at the least).

Great info, will try that soon. First I’m going to get a quick sanity check here and throw this up in an S3 bucket to see what that does. I suspect it’ll give me the same issue but, I am (re) learning this stuff after a long hiatus; it’s been a while :frowning:
Thanks bud!