Quickstart Guide doesn't generate the static site shown on the server

I’ve tried doing Hugo’s Quick Start twice now. First on Ubuntu 20.04 and now again on macOS Monterey.

Everything looks correct when running the site on my local hugo server, but just not when I try to generate the static site. All I get after running hugo -D on Step 7 of the quick start guide is an ugly, static site that looks like this:

Does the quick start guide actually not have correct instructions? Or am I doing something wrong? It’s almost as if the ananke theme or the hugo CLI is not creating relative paths for the index.html file that is created or something.

This helped me. Make a Hugo Blog From Scratch | zwbetz

Are you trying to view the published site by opening public/index.html directly with your browser?

1 Like

Yes, that’s correct. Should I open it elsewhere?

Don’t do that. The public directory must be served (e.g., Apache, NGINX, IIS, etc.).

It is possible to create a site that can be navigated via the file system, but it is complicated, and probably not what you want.

1 Like

Got it. I’m hoping to eventually host a static site via an AWS S3 bucket, rather than on a server like Apache or NGINX. Because of this, I actually will need to set up the static site to navigate like a file system. Do you have any suggestions on how to best generate a static site in that way (e.g., File system-esque) with Hugo?

I don’t think that’s true.

My answer is probably not relevant for yor question but, to check you site locally use the hugo server command in a terminal (I use the command hugo server -D --disableFastRender) then go to http://localhost:1313/ to see the website in your browser.

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