List all the posts in the content/, no subsections

I’ve been trying to solve this problem for the last 6 hours but no luck. Here is my site hierarchy.

content/ 
       |..test.md
       |..test2.md
       |..test3.md

So, yeah there’s no subsection. I want my urls to look like example.com/test Now, I want to use the _default/list.html whenever I go to example.com/archive/ but I couldn’t figure out how to do so. Can anyone please guide me towards the right direction?

Not sure if my assumption is right but:
Hugo uses list.html only for corresponding sections. So if you don’t want to use sections, you would probably have to create something like example.com/archive.html in which you you put the information of your _default/list.html. Then make the link to archive.html available manually wherever you want.
(This might be so wrong, doh…)

BTW a folder in content/ is handled as section, not subsection.

1 Like