Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
darthmall opened this issue Feb 22, 2022 · 1 comment

Comments

@darthmall
Copy link

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”.

@j-f1
Copy link
Contributor

j-f1 commented Feb 22, 2022

Related: 11ty/eleventy#2175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants