# Site area without autogenerated listing?

**URL:** https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955
**Category:** Uncategorized
**Created:** [January 30, 2021, 2:17pm UTC](https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955 "2021-01-30T14:17:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Inaba](https://avatars.discourse-cdn.com/v4/letter/i/43a26b/32.png) [@Inaba](https://discourse.gohugo.io/u/Inaba)
#### Post date: [January 30, 2021, 2:17pm UTC](https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955/1 "2021-01-30T14:17:53Z")

</div>

Hello,  
I’m rather new to Hugo, and am doing test runs on site creation locally to get to grips with things.  
Let’s say I have a site with a few files like:

posts/my\_first\_post.md  
posts/another\_post.md  
posts/evenmore\_post.md  
about.md

This makes for a site with a structure of  
posts/my\_first\_post/  
posts/another\_post/  
posts/evenmore\_post/  
about/

And if you view /posts/ you get a listing of all the blog posts in a kind of directory.

Now my question is - what if you wanted to have a non-blogging section or something without a listing? Maybe a static docs directory, maybe standalone feature articles etc.

Something like  
posts/my\_first\_post/  
posts/another\_post/  
posts/evenmore\_post/  
about/  
feature\_articles/squares/  
feature\_articles/pyramids/  
round\_features/sphere/  
round\_features/torus/

Assuming the feature articles are built from squares.md,pyramids.md etc.  
Is there any way to tell Hugo to _not_ build a listing for a specified subdirectory? Ie I want a visitor to feature\_articles or round\_features to not see a listing, but perhaps a default page for that section? As far as I can tell putting an \_index.md in the directory customises the text that appears for the list, not blocks it.

I’ve looked in the docs but can’t see anything on this topic. Perhaps I missed it?

---

<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: [January 30, 2021, 4:00pm UTC](https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955/2 "2021-01-30T16:00:42Z")

</div>

> [@Inaba](#):
>
> Is there any way to tell Hugo to _not_ build a listing for a specified subdirectory? Ie I want a visitor to feature\_articles or round\_features to not see a listing, but perhaps a default page for that section?

You can turn off the creation of a Section list with [Build Options](https://gohugo.io/content-management/build-options/#readout)

---

<div class="post-metadata">

### Author: ![Inaba](https://avatars.discourse-cdn.com/v4/letter/i/43a26b/32.png) [@Inaba](https://discourse.gohugo.io/u/Inaba)
#### Post date: [January 31, 2021, 7:54am UTC](https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955/3 "2021-01-31T07:54:40Z")

</div>

Right, so as far as I can tell, there’s not so much a direct way to turn off creating a Section list itself, but if you add

> **Summary**
>
> \_build:  
> list: never

to the front matter of all items in that directory, Hugo won’t find anything to make a list with and thus will not generate it? And if you make an \_index.md with front matter including

> **Summary**
>
> cascade:  
> \_build:  
> list: never

That effectively causes the front matter of everything in the directory to have that list:never applied.  
Am I getting this correct?

---

<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: [January 31, 2021, 8:24am UTC](https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955/4 "2021-01-31T08:24:02Z")

</div>

> [@Inaba](#):
>
> Am I getting this correct?

Yes, this is how it is supposed to work, if you combine it with `cascade`.

---

<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: [February 2, 2021, 8:24am UTC](https://discourse.gohugo.io/t/site-area-without-autogenerated-listing/30955/5 "2021-02-02T08:24:50Z")

</div>

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