Eleventy
The possum is Eleventy’s mascot

Eleventy Documentation

This is an older version of Eleventy. Go to the newest Eleventy docs (current path: /docs/data-global/) or the full release history.
Menu

Global Data Files #

Your global data folder is controlled by the dir.data configuration option. All *.json and module.exports values from *.js files in this directory will be added into a global data object available to all templates.

Example #

Consider a JSON data file located at _data/userList.json with the following content:

[
"user1",
"user2"
]

This data will be available to your templates under the userList key like this:

{
userList: [
"user1",
"user2"
]
}

Folders