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
addGlobalData should execute once per build, currently executing once per template file #2179
Comments
Describe the bug Plugin (and addGlobalData) should run once per build, not once per template file. To Reproduce I created a simplified version of the bug here: https://github.com/dleatherman/eleventy-plugin-async-test where the build outputs 3 console logs (one for each of the layouts).
Expected behavior I would expect the plugin (or addGlobalData) to run once per eleventy build, not once per template file. I am awaiting content and then building individual pages via pagination. Each of the pages generated via pagination gets another instance of the plugin's function run causing my build to continue calling the content API exponentially. Environment:
Additional Context Possibly related to #1729 |
Hi @zachleat any idea on timing for this? It's causing me to hit quota limits about 100x faster than I should using Firebase for storage. |
@mattbloomfield Not a direct answer to your question, but a couple approaches I've used in the past:
|
This will go up with v1.0.1! Newest possible canary: |
Stellar! Thank you!! |
cc @dleatherman
The text was updated successfully, but these errors were encountered: