How can I get the posts directory's index.html to be in the root folder

In my content folder I have posts/subfolder/actualPost.md which also includes many subfolders and posts. When I generate the website with Hugo the main root index.html basically just has a link to Posts which then goes to the page I want in the root folder. Is there a way I can generate the website so that post/index.html is generated in the main root folder? I can’t seem to find anything to add in config.toml or some kind of argument to add as part of the command line. Any help would be greatly appreciated.

Have a look at URL management: URL Management | Hugo

Yes as well as this one: Directory Structure | Hugo I also found this article to be particularly interesting Hugo's Directory Structure Explained but none gave any indication on how to make the posts page my root page. The closest I could find in this forum was What layout is used for root-level content pages (content/about.md)? but that’s not really what I’m trying to do.

Option 1

hugo new posts/_index.md

posts/_index.md

+++
title = "Posts"
date = 2021-04-07T11:23:59-07:00
draft = false
url = "/"
+++

Option 2

layouts/_default/home.html

{{ define "main" }}
  {{ .Content }}
  {{ range where .Site.RegularPages "Type" "posts" }}
    <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
  {{ end }}
{{ end }}

A post was split to a new topic: Generation of pages fails on Gitlab site

Thank you. I can’t believe I made such a stupid mistake. I had used a basic template as my theme and being new to Hugo I just kept thinking to myself it was a configuration or deployment issue where it could be as simple as editing the main theme. I can’t believe that for whatever reason that never crossed my mind. Thank you.