# Organize articles folder

**URL:** <https://talk.jekyllrb.com/t/organize-articles-folder/5569>\
**Category:** Help\
**Created:** [January 28, 2021, 11:47am UTC](https://talk.jekyllrb.com/t/organize-articles-folder/5569 "2021-01-28T11:47:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddypjj](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@ddypjj](https://talk.jekyllrb.com/u/ddypjj)\
**Post date:** [January 28, 2021, 11:47am UTC](https://talk.jekyllrb.com/t/organize-articles-folder/5569/1 "2021-01-28T11:47:39Z")

</div>

I am new to Jekyll. I want to build a site from scratch.  
I want to have articles which grouped into some folders.

I have navigation like this

- name: Home  
link: /
- name: Cook  
link: /cook.html
- name: Blog  
link: /blog.html
- name: Diary  
link: /diary.html

I want have folder for each menu. And if i click one of them it will show the list for each articles in that folder.

is that possible by creating folder \_cook, \_blog, \_diary and make page cook.html, blog.html, and diary.html and do for looping?  
Thank you guys

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 28, 2021, 1:22pm UTC](https://talk.jekyllrb.com/t/organize-articles-folder/5569/2 "2021-01-28T13:22:21Z")

</div>

Do you want pages to be

```auto
/
/cook/ # ie /cook/index.html
/cook/abc.html
/cook/def.html
/blog/
/blog/...
...

```

That would be more typical in web standards than `/cook.html` and `/cook/abc.html` mixed.

PS. Jekyll already has support for blog posts so look at Posts in the docs. A standard theme typically comes with a for loop that shows all pages on the homepage

e.g. [Jekyll Blog Demo | Base for a static website blog - built with Jekyll and the default theme](https://michaelcurrin.github.io/jekyll-blog-demo/)

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 28, 2021, 1:25pm UTC](https://talk.jekyllrb.com/t/organize-articles-folder/5569/3 "2021-01-28T13:25:49Z")

</div>

Have a look at the 10 step intro tutorial in Jekyll docs

> **[Setup](https://jekyllrb.com/docs/step-by-step/01-setup/)**
>
> Welcome to Jekyll’s step-by-step tutorial. This tutorial takes you from having some front-end web development experience to building your first Jekyll site from scratch without relying on the default gem-based theme.

Once you understand how to setup the basic pages, you can use Collections.

> **[Collections](https://jekyllrb.com/docs/collections/)**
>
> Collections are a great way to group related content like members of a team or talks at a conference.

You’ll be able to iterate over pages here.

```auto
_cook/
  abc.md
  def.md

```

And put them all on a list on `/cook/`

Using

```auto
{% for p in site.cook %}
- [{{ p.title }}]({{ p.url | relative_url }})
{% endfor %}

```

Result

- ABC
- DEF

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 28, 2021, 1:31pm UTC](https://talk.jekyllrb.com/t/organize-articles-folder/5569/4 "2021-01-28T13:31:51Z")

</div>

For example I have a shows collection here

> **[MichaelCurrin/the-buckfever-underground](https://github.com/MichaelCurrin/the-buckfever-underground/tree/master/_shows)**
>
> master/\_shows

And the list page here with permalink `/shows/`. I put the file as `_pages/shows.md` but `shows.md` in the root works too.

> <https://github.com/MichaelCurrin/the-buckfever-underground/blob/master/_pages/shows.md>

Result:

> **[Shows](https://www.thebuckfeverunderground.co.za/shows/)**
>
> Spoken-word experimental rock band in Cape Town, South Africa.

---

<div class="post-metadata">

**Author:** ![ddypjj](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@ddypjj](https://talk.jekyllrb.com/u/ddypjj)\
**Post date:** [January 30, 2021, 1:34am UTC](https://talk.jekyllrb.com/t/organize-articles-folder/5569/5 "2021-01-30T01:34:28Z")

</div>

Thanks @MichaelCurrin this is what i am looking for
