Prevent Page Generation Output
#Sometimes you may want to create content using your preferred templating language but not actually output an individual page.
The preferred way to do this is via permalink:
permalink: false
If you want this to apply to an entire collection, you can do this in a directory data file. This example is used for this very site to create the resource content on the home page:
{
"tags": "resources",
"permalink": false
}
Read more about setting permalink to
false
in the official docs
Excluding Content From Collections
#Within a directory intended to be content for a collection, you may have content, such as the index, that you do not want included in the collection itself.
For this, use:
eleventyExcludeFromCollections: [value of tag for collection]
Or, if you are using the all
collection such as for creating an RSS feed, you may want to exclude some content from being added to that collection:
eleventyExcludeFromCollections: all
And to entirely exclude the content from any collection, set to true
:
eleventyExcludeFromCollections: true