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:

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

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 a collection and a layout with the name of the collection exists, it is used. Else, the pages layout is used.

Examples with existing 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