How to set default permalink to sitepathroot/:title.html (no subdirectories)?


I want all pages on my website to have the following permalink structure:


All of my .html content files (not using markdown for misc. reasons) are in content/ (not in a subdirectory/category). As such I have set the following in config.toml:

theme = “purehugo”

"" = “:title.html”

However, it is not working. hugo still generates subfolders for every single page, and places an index.html in each folder.

How can I fix this, so Hugo builds the site I want?


Set the option in config.toml to achieve what you intend.

uglyURLs:                   true

Configuration documentation

Thank you! Works like a charm