I have built a multiple-page website using Hugo and it works perfectly in development mode, even at this moment. However, when I put the public folder under the configured folder /var/www of nginx, adjusted nginx configuration to serve this static website locally, but then the this website just shows up with broken UI. Clicking on links does not show anything, instead the not found from nginx server.
I still do not understand about the issue but would like to have your help on following un-clear points:
I inspected the public folder generated by hugo command and saw that except css, fonts, images and js folders, there is only 1 html file which is index.html given that I created many content pages and custom layout files for them as well.
It looks like Hugo combines all the pages created by me into 1 index.html. I looked into the index.html and its content is not including content of the other pages at all.
I wonder if it is the expected result?
I created a couple of folders and files under Hugo content and layouts folders. Is it possible to make Hugo generate the website directory structure like the one I created?
OS: Mac OS 10
Output of hugo env:
Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown
Thanks for the information. Now I understand that part better.
It looked like a hack for me because I thought that when running hugo command to build production website, from end-user perspective, Hugo should automatically set the page attribute to released status or so. Anyway, things are clearer now.
I’m glad it is clearer. I wanted to add, the reason we do that is for flexibility. If you don’t want to use draft in your front matter, you don’t have to. It works really well for teams, for instance, or if you like to write and save your work in your content repo, you keep the draft until you are ready to publish a piece. But if you want every piece of your content to publish immediately, omit it from your archetypes.