WoJ
WoJ

Reputation: 29987

How to compile to named files by default?

I am starting with Jekyll and the docs mention the possibility to generate

A fresh installation of Jekyll with the default settings compiles an about.md file to http://example.com/about/index.html.

How to change the default behaviour to generate named HTML files?

Upvotes: 1

Views: 31

Answers (1)

rocambille
rocambille

Reputation: 15976

Try permalinks. The default value for pages is /:path/:basename, which leads to directories and index.html as you noticed. In the YAML Front Matter of about.md, you can add:

permalink: /:path/about.html

Alternatively, you can modify your configuration in _config.yml to change the behaviour for all pages:

permalink: /:path/:basename.html

Upvotes: 1

Related Questions