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

Normalize signature of this in callbacks that operate on templates #1522

Closed
zachleat opened this issue Nov 21, 2020 · 7 comments
Closed

Normalize signature of this in callbacks that operate on templates #1522

zachleat opened this issue Nov 21, 2020 · 7 comments

Comments

@zachleat
Copy link
Member

Thinking https://www.11ty.dev/docs/config/#transforms and linters and before callback in Pagination (#1209).

This will be important before 1.0 release to avoid any breaking changes.

I’d like the metadata available in this to be consistent here. Specifically this.page.inputPath instead of this.inputPath. See https://www.11ty.dev/docs/data-eleventy-supplied/

There are likely others—I don’t have time to compile them all here right this second but we’ll need to look through and find them all.

@zachleat
Copy link
Member Author

zachleat commented Sep 28, 2021

Related to #338 (and #130)

There are two styles in play here:

Collection-style:

  • inputPath, fileSlug, outputPath, url, date, data (full data cascade), templateContent

Template-style:

  • inputPath, fileSlug, outputPath, url, and date go through page
  • full data cascade and templateContent are not available in some cases

ACTION ITEMS

@zachleat
Copy link
Member Author

After this last analysis I don’t think this is a blocker for 1.0. Moving it out of the milestone.

@zachleat zachleat added the release: punted Punted out of a previous release milestone due to time constraints label Aug 15, 2022
@zachleat
Copy link
Member Author

Filters/helpers shipped with #2250

@zachleat zachleat removed the release: punted Punted out of a previous release milestone due to time constraints label Dec 14, 2022
@zachleat
Copy link
Member Author

this.page is available on Shortcodes, Filters, Linters, Transforms in 2.0.0-canary.19 and newer

@zachleat
Copy link
Member Author

page and content (aliased to templateContent) is available on Collections items on 2.0.0-canary.19 and newer. https://www.11ty.dev/docs/collections/#collection-item-data-structure

@nhoizey
Copy link
Contributor

nhoizey commented Dec 15, 2022

Time to move to the 2.x branch I guess!

@zachleat
Copy link
Member Author

Cross linking the shortcode work that shipped with v0.11.0 #741

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