Collections

Auto-collections §︎

Every root sub-folder in the source folder (default src/) which name doesn't start with an underscore (_) automaticaly becomes a collection.

Any permalink property set directly in a content's Front Matter will not be overriden by the global one here after.

For all pages at once, you can decide with the permalinkFolders property in the configuration file how you want permalinks to behave:

  • set it totrue to preserve Eleventy's default behavior where every Markdown file becomes a folder and an index.html file (default)
  • set it to false to generate less folders

Examples:

sourcepermalinkFolders = truepermalinkFolders = false
index.mdindex.htmlindex.html
about.mdabout/index.html ⚠︎about.html
about/index.mdabout/index.html ⚠︎about/index.html
about/other.mdabout/other/index.htmlabout/other.html
articles/2020/04/first-article/index.mdarticles/2020/04/first-article/index.htmlarticles/2020/04/first-article.html

As you can see, you can't have both /about.md and /about/index.md with Eleventy default behavior (permalinkFolders = true), as they would try to create the same HTML file.

Layouts §︎

Any layout property set directly in a content's Front Matter will not be overriden by the global ones here after.

If the content comes from one of the collections above and a layout exists with the same name as the collection, it is used. The pages layout is used as a fallback.

Examples if there are articles and notes layouts:

sourcelayout
index.mdpages
about.mdpages
about/index.mdpages
about/other.mdpages
articles/index.mdarticles
articles/2020/04/first-article/index.mdarticles
articles/first-article.mdarticles
notes/2020/0001/first-note.mdnotes

Pagination §︎

WIP

Atom feeds §︎

WIP