Make homepage the posts list page

Im brand new to hugo, so sorry if this is a simple question. I’ve tried finding the answer but no solution is really making sense to me.

I have a Website of structure.

.
└ content/
  └ about.md
  └ test.md
  └ contact.md
  └ posts
    └ post_1.md
    └ post_2.md

on the homepage of my website I would like to display a list of posts only.
I know I can get a list of posts by visiting /posts/
but how do i get that as my homepage? Right now my homepage loops over all pages.

here is an eample of my list.html template…

{{ define "main" }}
  <mai>
    {{- .Content -}}
  </main>
  <section>
    {{ range .Pages }}
      <div>
        {{- partial "summary.html" . -}}
        <hr>
      </div>
    {{ end }}
  </section>
{{ end }}```

{{ range .Pages }}

=>

{{range where .Site.RegularPages "Section" "posts" }}

For reference:

1 Like

Thank you so much!

1 Like