The Equal Justice Initiative
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-preprocessing/) or the full release history.

Global Data File Preprocessing #

Deprecation Warning: This feature is deprecated and will be removed in a future version of Eleventy. You can use JavaScript Data Files or Computed Data instead.

Global JSON data files (not template/directory data files) can be optionally preprocessed with a template engine specified under the dataTemplateEngine configuration option. package.json data is available here under the pkg variable.

For example, if your dataTemplateEngine is using liquid you can do this:

"version": "{{ pkg.version }}"