# How to automatically generate index.html files for all pages?

**URL:** <https://talk.jekyllrb.com/t/how-to-automatically-generate-index-html-files-for-all-pages/6975>\
**Category:** Help\
**Created:** [February 8, 2022, 3:26pm UTC](https://talk.jekyllrb.com/t/how-to-automatically-generate-index-html-files-for-all-pages/6975 "2022-02-08T15:26:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chamik](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chamik/32/4322_2.png) [@chamik](https://talk.jekyllrb.com/u/chamik)\
**Post date:** [February 8, 2022, 3:26pm UTC](https://talk.jekyllrb.com/t/how-to-automatically-generate-index-html-files-for-all-pages/6975/1 "2022-02-08T15:26:47Z")

</div>

Hey everyone. I’m trying to figure out how to generate the site in a way that will allow for every link to end with a `/`. To illustrate, here’s my current project structure:

```auto
src/
├── contact
│ └── pgp.md
├── contact.md
└── index.html

```

When I build the site, I get this:

```auto
build/
├── contact
│ └── pgp.html
├── contact.html
└── index.html

```

But I’d like to get something like this:

```auto
build/
├── contact
│ ├── index.html
│ └── pgp
│ └── index.html
└── index.html

```

Where I can search for a page by typing for example `domain.com/contact/pgp/` instead of `domain.com/contact/pgp.html`. Is there a jekyll configuration for this that I missed?

Or alternatively is there a NGINX setting for this type of behavior?

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [February 8, 2022, 4:04pm UTC](https://talk.jekyllrb.com/t/how-to-automatically-generate-index-html-files-for-all-pages/6975/2 "2022-02-08T16:04:24Z")

</div>

You can [change how pages are generated with the `permalink` configuration setting](https://jekyllrb.com/docs/permalinks/). I believe the `pretty` option will do what you want:

```auto
permalink: pretty

```

---

<div class="post-metadata">

**Author:** ![chamik](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chamik/32/4322_2.png) [@chamik](https://talk.jekyllrb.com/u/chamik)\
**Post date:** [February 8, 2022, 4:08pm UTC](https://talk.jekyllrb.com/t/how-to-automatically-generate-index-html-files-for-all-pages/6975/3 "2022-02-08T16:08:01Z")

</div>

Yes, that’s exactly what I needed! Thanks.
