List of posts like archive

I’m trying to make a page that shows posts like a list in addition to current pages. It can be actually called as archive. I have found some articles on hugo support page but when I was trying to apply it onto my website, something went wrong. I can’t determine where I’m doing wrong. The theme of my website is on includes single.html and list.html) What I expect as archive that exactly is Thanks for your helps.

Thanks for your advice. But, I’m not too good at web development. What should I do with the snippet? Because of that I have shared github url and example url.

I would suggest you try to read the documentation and the examples given there; also have a look at other Hugo sites, many of them have source code available, and you should be able to find an “archive sample” to mimic.

Here’s how I do it:

I have a content type under layouts called archive. I then make a single file in content in the folder archive. Then, in the archive/single.html page, I iterate over all .Site.Pages and display a partial that represents how I want each entry in the archive to look.