HUGO -d Static Sites

Hi,
am new to hugo, I was following the quickstart guide…and i ran into the following:

when i run the webserver the site looks fine, but after I run hugo -D to generate static sites it all weird, formatting is gone, images don’t show, etc. how can i fix this?

Thanks

Hi @lnardog,

How do you view your built site? Using webserver (as with hugo serve)?

Seems like it happened because you’ve opened index.html from public folder to view result in the browser. And this will not work as expected because all paths in template to resources are relative to webserver and not to local file directory. To preview built website you need to run it using webserver.

Hope this helps!

baseUrl :wink:

yeap that is exactly what i tried to do, just open the index file.

thanks both for providing that insight!

1 Like