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

Throws an error on reserved Eleventy data properties in the data cascade. #3251

Merged
merged 4 commits into from Apr 13, 2024

Conversation

zachleat
Copy link
Member

@zachleat zachleat commented Apr 13, 2024

Right now this includes:

  • pkg (Object.freeze’d)
  • eleventy (Object.freeze’d)
  • content
  • collections
  • page.date
  • page.inputPath
  • page.fileSlug
  • page.filePathStem
  • page.outputFileExtension
  • page.templateSyntax
  • page.url
  • page.outputPath

This applies to overrides from anywhere in the data cascade (global data, template data, front matter, directory data files, etc)

Escape hatch provided via eleventyConfig.setFreezeReservedData(false) to disable this feature. Default is enabled.

#1173 #2824 #3132

@zachleat zachleat added this to the Eleventy 3.0.0 milestone Apr 13, 2024
@zachleat zachleat merged commit 4c5d44d into main Apr 13, 2024
6 checks passed
@zachleat zachleat deleted the frozen-reserved-data branch April 13, 2024 21:23
@zachleat
Copy link
Member Author

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

Successfully merging this pull request may close these issues.

None yet

2 participants