2

I have my static website in hugo, this is the folder structure:

Hugo static site init structure

I do not why, when I do hugo -D to build hugo, it generates the following scaffolding:

Scaffolding Image generated by Hugo

I just want pricing, terms and privicy page in the root folder after building hugo, with their respective names, not a folder with the name and inside an index.html file.

NOTE: pricing, terms and privacy page are using single.html

NearHuscarl
  • 66,950
  • 18
  • 261
  • 230
Loui
  • 21
  • 3

1 Answers1

2

Hugo defaults to using pretty links, that is to say ending with a trailing slash and no extenstion. That is what you are seeing output, hugo creates an index file in its own directory.

This means you don't get URLs like example.com/pricing.html, which is generally what people prefer.

If you would prefer a flatter structure, and don't mind your pages showing the .html extension, you should enable uglyUrls.

The URL management documentation for Hugo details both options.

Seth Warburton
  • 2,234
  • 1
  • 16
  • 17