# Pages return the directories instead of pages

**URL:** <https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914>\
**Category:** support\
**Created:** [November 22, 2019, 12:55pm UTC](https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914 "2019-11-22T12:55:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgmaven](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@kgmaven](https://discourse.gohugo.io/u/kgmaven)\
**Post date:** [November 22, 2019, 12:55pm UTC](https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914/1 "2019-11-22T12:55:53Z")

</div>

Content directory:

```auto
content
  angular
    get-started.md
  reactjs
    get-started.md

```

index.html:

```
{{ range .Pages }}
<section class="post">
	<header class="post-header">
		<h2 class="post-title"><a href="{{.Permalink}}">{{.Title}}</a></h2>
	</header>
	<div class="post-description">
		<p>{{.Summary}}</p>
	</div>
</section>
{{ end }}

```

In my opinion, the home page should list all the pages(`/angular/get-started` and `reactjs/get-starated` in my case), however it list the `angular` and `reactjs`:

![](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/2/25515c327354ad57932a72eabbff67d03f0525ff.png)

What’s going on?

Also, why it add the `s` after the directory name `angular`?

* * *

Hugo Static Site Generator v0.59.1-D5DAB232

---

<div class="post-metadata">

**Author:** ![kgmaven](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@kgmaven](https://discourse.gohugo.io/u/kgmaven)\
**Post date:** [November 22, 2019, 1:01pm UTC](https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914/2 "2019-11-22T13:01:59Z")

</div>

BTW, I followed this [video](https://www.youtube.com/watch?v=gnJbPO-GFIw&list=PLLAZ4kZ9dFpOnyRlyS-liKL5ReHDcj4G3&index=11) and refer to this [layout](https://github.com/giraffeacademy/ga-hugo-theme/blob/master/layouts/_default/list.html)

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [November 22, 2019, 2:31pm UTC](https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914/3 "2019-11-22T14:31:33Z")

</div>

There was a breaking change in Hugo 0.57.0 that affected the homepage/index page collection.

You can look it up in the release notes and [this issue](https://github.com/gohugoio/hugoThemes/issues/682)

That is what’s going on.

By the way the best source for Hugo themes is the [Hugo Showcase](https://themes.gohugo.io/) always up-to-date with themes that work with the latest version of Hugo.

And the best way to learn Hugo are the always up-to-date [Hugo Docs](https://gohugo.io/documentation/)

Not some random video or theme from 2017.

---

<div class="post-metadata">

**Author:** ![kgmaven](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@kgmaven](https://discourse.gohugo.io/u/kgmaven)\
**Post date:** [November 23, 2019, 4:08am UTC](https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914/4 "2019-11-23T04:08:54Z")

</div>

Thanks for your reply.

But the hugo docs I found [here](https://gohugo.io/templates/homepage/) does not mention the `.Site.RegularPages`. Also the video I followed is provided by [hugo docs](https://gohugo.io/templates/introduction/).

Thank you anyway, the problem have been solved.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [November 23, 2019, 9:04am UTC](https://discourse.gohugo.io/t/pages-return-the-directories-instead-of-pages/21914/5 "2019-11-23T09:04:39Z")

</div>

Thanks for pointing out the above.

I’m not maintaining or contributing to the Hugo Docs myself as my available time goes towards maintaining other repositories of the project.

But I am notifying some people at the bottom of this post about the outdated documentation regarding the Homepage Pages Collection located over here:

> **[Homepage Template](https://gohugo.io/templates/homepage/)**
>
> The homepage of a website is often formatted differently than the other pages. For this reason, Hugo makes it easy for you to define your new site's homepage as a unique template.

`.Pages` needs to become `.Site.RegularPages`

And the [outdated video](https://www.youtube.com/watch?v=gnJbPO-GFIw&feature=emb_title) from Giraffe Academy probably needs to be removed from [here](https://gohugo.io/templates/introduction/) as well.

cc: @kaushalmodi @bep
