List of all posts, located at custom URL

I’m migrating a Lektor-generated site to Hugo. On my current site I have a list of all posts, paginated like this:

… and so on.

Is it possible for Hugo to generate a list of all posts with a URL structure like this? I’d like to keep the existing URLs instead of redirecting to a new URL structure.

Yes, but you need to create a section (root folder) with the name all-posts. If this isn’t where you store your content, you have to create one dummy content file for that section to be created. You will then have to create a list template that lists all the content with a paginator.

Thanks, with your help I’ve got URLs like this working:


Here’s the commit where I implemented this section.

In order to match my existing site’s URLs, I need to move the “all-posts” section here:


I don’t know how to do that yet. I think I have the same question as

Aha, I’m all fixed now. I’ve added to config.toml:

baseurl = ""

and then moved my content into the root dir, and finally created a home page using the trick from this discussion:

  {{ range where .Data.Pages "Section" "home" }}
    {{ .Content}}
  {{ end }}