Hugo creating directory page

I currently have a dropdown menu that automatically shows pages from my “role_pages” folder.

File setup is as follows:

In my themes folder I have a /role_pages folder that has single.html page and in my content folder


Dropdown menu code:
{{ range where $.Site.Pages "Type" "role_pages" }} <li><a href="{{ .Permalink }}">{{ .Title }}</a></li> { end }}
My dropdown menu populates correctly, but it is adding a ’ Role_pages’ link to the list, and created a ‘/role_pages/’ page to my site as well.

I can’t seem to figure out why?

solved this by changing {{ range where $.Site.Pages "Type" "role_pages" }} to {{ range where $.Site.RegularPages "Type" "role_pages" }}

If you want to change the page links in that section to not include the section name, do

  role_pages = "/:filename/"