# Range .Site.Pages for a specific list

**URL:** <https://discourse.gohugo.io/t/range-site-pages-for-a-specific-list/24626>\
**Category:** support\
**Created:** [April 10, 2020, 4:20pm UTC](https://discourse.gohugo.io/t/range-site-pages-for-a-specific-list/24626 "2020-04-10T16:20:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricTalv](https://avatars.discourse-cdn.com/v4/letter/e/b9bd4f/32.png) [@EricTalv](https://discourse.gohugo.io/u/EricTalv)\
**Post date:** [April 10, 2020, 4:20pm UTC](https://discourse.gohugo.io/t/range-site-pages-for-a-specific-list/24626/1 "2020-04-10T16:20:09Z")

</div>

So say i have content folders filled with pages,  
what if i want on my single page to list out all of my pages contained in one of those folders.

I know you can range all pages with .Site.RegularPages  
But is there a way to give it a certain folder to look into and only write out those pages contained there?

---

<div class="post-metadata">

**Author:** ![jakejarvis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jakejarvis/32/10028_2.png) [@jakejarvis](https://discourse.gohugo.io/u/jakejarvis)\
**Post date:** [April 10, 2020, 4:49pm UTC](https://discourse.gohugo.io/t/range-site-pages-for-a-specific-list/24626/2 "2020-04-10T16:49:42Z")

</div>

So your content folder has multiple subfolders within it? This is what I do in [my RSS template](https://github.com/jakejarvis/jarv.is/blob/18a9c37c42747f96eaed56dabbf2c89dda8fad79/layouts/rss.xml#L19) to only include posts in my `content/notes/` folder, for example:

```auto
{{ range (where .Site.RegularPages "Section" "notes") }}
  ...
  {{ .Content }}
  ...
{{ end }}

```

More info on sections:

> **[Content Sections](https://gohugo.io/content-management/sections/)**
>
> Hugo generates a \*\*section tree\*\* that matches your content.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 12, 2020, 4:49pm UTC](https://discourse.gohugo.io/t/range-site-pages-for-a-specific-list/24626/3 "2020-04-12T16:49:43Z")

</div>

Closed on April 12, 2020, 4:49pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
