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

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:

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

When I build the site, I get this:

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

But I’d like to get something like this:

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?

You can change how pages are generated with the permalink configuration setting. I believe the pretty option will do what you want:

permalink: pretty

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