Data from local template front matter
variable1: value1
Data from layout front matter
variable2: value2
Data from local json file
variable3: value3
variable4: [object Object]
variable5: value5
variable7: [object Object]
variable8: value8
Data from local template 11tydata.js file (available to local template only)
variable10: value10
Data from parent folder 11tydata.js file (available to all child templates)
variable15: value15
Data from global js file in _data folder (available to all templates)
variable11:
Data from global json file in _data folder (available to all templates)
variable12:
Data from global json file in subfolder of _data folder (available to all templates)
variable13: value13
Data from global eleventy config file (available to all templates)
myStatic: static
myFunction: Sat May 20 2023 05:50:42 GMT+0000 (Coordinated Universal Time)
Dump of all data
<pre><ref *1> {
site: {
host: 'https://enchanting-malabi-4c2a4e.netlify.app/',
name: '11ty starter website',
language: 'en',
environment: 'production',
db_host: undefined,
db_user: undefined,
db_password: undefined
},
foo: { bar: { variable13: 'value13' } },
myStatic: 'static',
myFunction: 2023-05-20T05:50:42.780Z,
eleventy: {
version: '2.0.0',
generator: 'Eleventy v2.0.0',
env: {
source: 'cli',
config: '/opt/build/repo/.eleventy.js',
root: '/opt/build/repo',
isServerless: false
}
},
pkg: {
name: 'eleventy-poc',
version: '1.0.0',
description: '',
main: 'index.js',
scripts: {
test: 'echo "Error: no test specified" && exit 1',
start: 'npx @11ty/eleventy --serve'
},
keywords: [],
author: '',
license: 'ISC',
devDependencies: { '@11ty/eleventy': '^2.0.0-canary.23' },
dependencies: {
'@11ty/eleventy-fetch': '^3.0.0',
dotenv: '^16.0.3',
'netlify-plugin-cache': '^1.0.3'
}
},
variable1: 'value1',
variable2: 'value2',
eleventyComputed: { datum: [Function: datum] },
variable15: 'value15',
variable3: 'value3',
variable4: { variable5: 'value5', variable6: 'value6' },
variable7: [ { variable8: 'value8', variable9: 'value9' } ],
variable10: 'value10',
layout: 'default.njk',
page: {
date: 2023-05-20T05:50:26.621Z,
inputPath: './src/foo/bar/bar.njk',
fileSlug: 'bar',
filePathStem: '/foo/bar/bar',
outputFileExtension: 'html',
templateSyntax: 'njk',
url: '/foo/bar/',
outputPath: 'www/foo/bar/index.html'
},
collections: {
all: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object]
]
},
datum: [Circular *1]
}</pre>