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

Hello,

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

siteroot.tld/page-title.html
siteroot.tld/another-page-title.html

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”

[permalinks]
“” = “: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?

Thanks

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

uglyURLs:                   true

Configuration documentation

Thank you! Works like a charm