Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 683 Bytes

data-preprocessing.md

File metadata and controls

21 lines (17 loc) · 683 Bytes
eleventyNavigation
parent key order
Global Data Files
Data Preprocessing
4

Global Data File Preprocessing

All global JSON data files (not template/directory data files) will be preprocessed with the template engine specified under the dataTemplateEngine configuration option. Note that package.json data is automatically available here under the pkg variable.

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

{% raw %}

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

{% endraw %}

If using dataTemplateEngine: false in your configuration file, data file preprocessing will be skipped.