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

renderData + Computed Data #1246

Open
Snugug opened this issue Jun 11, 2020 · 0 comments
Open

renderData + Computed Data #1246

Snugug opened this issue Jun 11, 2020 · 0 comments

Comments

@Snugug
Copy link
Contributor

Snugug commented Jun 11, 2020

Describe the bug
When combining renderData and Computed Data, the end result is the un-rendered string version of renderData (so something like {{foo.bar}}). It looks like you're looking to deprecate renderData in favor of Computed Data, but my current scenario requires both: I'm using pagination to generate localized versions landing pages, and the titles for those landing pages aren't held in a title attribute, but rather a nested attribute that I was using renderData to surface, then normalizing that (and other generic places where title may be stored) and creating a data cascade to surface it. Without renderData available, I need to hunt and peck for individual page URLs in Computed Data to get the right title, which is harder to maintain than keeping it in renderData in the template.

To Reproduce
Steps to reproduce the behavior:

  1. Create a data-driven paginated output
  2. Include a renderData property from an attribute in the data
  3. Use Computed Data to retrieve the value of the above property
  4. Note it not being rendered

Expected behavior
Expect that renderData is resolved as part of computed data

Environment:

  • Eleventy Version 0.11.0
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

1 participant