11ty / 11ty-website

Documentation site for the Eleventy static site generator.

Home Page:https://www.11ty.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make it clear that Eleventy’s data keys can’t be set as computed today

darthmall opened this issue · comments

According to Configure Your Templates Eleventy’s special data keys can be configured anywhere in the data cascade.

There are a few special data keys you can assign in your data to control how templates behave. These can live anywhere in the Data Cascade.

According to the data cascade docs, computed data is part of the data cascade. But in Computed Data: Advanced Details, there is a bullet point stating that the only special data key that can be set in computed data is permalink.

You can use or set permalink in eleventyComputed and it will work (permalink is a top-level special case computed property anyway). Setting other special Eleventy data keys are not yet supported.

This seems like important information that shouldn’t be buried in a second-level bullet under “Advanced Details” but should be called out at the top of the page on both “Computed Data” and “Configure Your Templates”.