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.
- Starting in Eleventy 1.0, this feature is disabled by default: dataTemplateEngine: false
- Prior versions of Eleventy used Liquid preprocessing by default: dataTemplateEngine: "liquid"
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 }}"
}
