Creating list view for custom permalink [SOLVED]

My current permalink is /:year/:slug/ and I want to show all posts written in a certain year. All my posts are stored under content/posts.

After reading the Hugo docs regarding list templates I tried to create a template by using the default list template at layouts/_default/list.html, but it didn’t work. Furthermore I tried to create a section specific list template at layouts/posts/list.html, but that didn’t worked either.

There is, currently, no relation between permallink and any list view.

A search in here for “archive year” or similar may give you more info.

Good idea. I’ve took a look at each website in the showcase section and saw some themes with the url but none of theme displayed there any content.

However, the answer from @RickCogley in this post should solve the problem.

I came up with a nifty solution to this problem using taxonomies see this post.

note: this is a full solution, not a workaround. It creates an index.html at urls /year/ and /year/month/.

1 Like

@Weston_McNamee I created an issue. Let’s see what happens.

We need to create a paid version of Hugo, which will work lists for all folders, bread crumbs, Prev&Next for current folder and markdown inside html tags