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

Error messaging when you attempt to set reserved Eleventy Data names #1173

Closed
Dexus opened this issue May 12, 2020 · 3 comments
Closed

Error messaging when you attempt to set reserved Eleventy Data names #1173

Dexus opened this issue May 12, 2020 · 3 comments

Comments

@Dexus
Copy link

Dexus commented May 12, 2020

I would like to see a Documentation with alle reserved variables like page && page.xxx or content if you use it with markdown and a layout file in nunjucks or something else.

It is difficult to find all the reserved variables, and it looks like if I use them as file in _data folder, it will not merged or respected.

@zachleat
Copy link
Member

https://www.11ty.dev/docs/data-eleventy-supplied/ does exist

Going a little further, I think we should add some error messaging if you try to set one of these. I’m going to swap this issue to include that as well.

One of these issues is using alias: page with pagination (see #2161 (comment))

@zachleat zachleat changed the title documentation of reserves variables and functions Error messaging when you attempt to set reserved Eleventy Data names Jun 16, 2022
@zachleat zachleat added this to the Eleventy 3.0.0 milestone Apr 12, 2024
@zachleat
Copy link
Member

zachleat commented Apr 12, 2024

Swapping to bug behavior. Some of this work is finished to freeze the pkg and eleventy properties in global data in this branch: https://github.com/11ty/eleventy/tree/frozen-reserved-data

We’ll give an escape hatch here to let folks disable this behavior in configuration: eleventyConfig.setFreezeReservedData(false);

More to come!

@zachleat
Copy link
Member

Fixed by #3251 Shipping with 3.0.0-alpha.7

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

2 participants