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?
How do you view your built site? Using webserver (as with
Seems like it happened because you’ve opened
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!
yeap that is exactly what i tried to do, just open the index file.
thanks both for providing that insight!