HTML files under public/posts are all index.html in named subdirectories

I am learning the ropes of Hugo and testing out the XMin theme with sample posts.

If the posts are a.mmark, b.mmark, and c.mmark what I see in /public/posts are three folders marked a, b, and c, each containing a file called index.html.

Is this how it is supposed to be?

Thanks.

This is the default behavior. If you create a content file at content/posts/my-first-post.md then you can access it at /posts/my-first-post/ (with index.html being omitted).

There are different options to customize the behavior. Could you give us a bit more information about what you expect?

1 Like

From my previous experience with barebones websites and WordPress, i would have expected the .html files to have the same (base)names as the .mmark files for distinguishability.

Here all the HTML files are named the same and are therefore identifiable only via their containing folders. That dismayed me at first and prompted my question, in case I was doing something silly.

If this is the default behaviour, I am reassured.

I suspect that my question arose really because of a “mindset” from prior experience rather than anything real. In point of fact I now realize that the source files are .mmark (not .html) and therefore distinguishable.

Isn’t it true that the HTML files are rendered afresh with each invocation of hugo?

Thank you for your reply.

Wordpress and co. might handle this differently. But Hugo should also serve your needs. The uglyURLs configuration option will enable your expected behavior.

That is correct. The hugo command will (re)generate your whole website again. By using the hugo server command your changes will be immediately applied including a reload of the current page in the browser.