-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
2.0.0-canary.21 in dev mode: permalinks and collections #2710
Comments
Ah, yeah I found two regressions here, one in non And more controversially, during Shipping with v2.0.0-canary.22 |
@zachleat Thanks as always, sir! |
v2.0.0-canary.22 just shipped, can you retest please?? 🙌🏻 |
Desired result: Without With I have pushed changes to my repo without invoking a new build in case it would be helpful (i.e., seeing if at this point it’s a PEBKAC issue on my part): |
Yeah, we do require a tiny bit of configuration in order to map collection dependencies for incremental builds (for now? #975) Docs for this: https://www.11ty.dev/docs/data-configuration/#advanced In your case it seems like you’ll need to add: |
@zachleat Had missed seeing that. Thank you! |
(with the caveat that I just spotted one more caching edge case from this discussion, look for that in the next release) hides |
Re my what-if-it’s-PEBKAC comment, I did find some inconsistencies with the calls to the collection itself (some called it |
I also see that, with |
@zachleat In case you wanted me to test 2.0.0-canary.23 as well: be advised that I just loaded it and saw the same behavior as in canary.20 and canary.22 re |
Spent a little time on this this morning and ran into a few things! For some reason On that same note I see https://github.com/brycewray/eleventy_site/blob/09bb306fa753b5a0ca17019a730f681cf7795909/eleventy.config.js#L274-L281 also does All of that said, I think the only issue here is that you used ---
eleventyImport:
collections: ["post"]
--- Incremental builds are applied correctly to index pages when this is used! |
@zachleat Yes, tried 2.0.0-canary.24 last night and encountered the And thanks very much 🙏 for the info re |
I think this one is resolved! I also improved the docs because the confusion here definitely would have been repeated! Improvements here: https://www.11ty.dev/docs/collections/#declare-your-collections-for-incremental-builds |
Thanks for notifying me, @zachleat, @brycewray. Thanks for all the work you have done for the recent releases, @zachleat. I'm sorry that eleventy-sass bothers you. |
No worries @kentaroi I would just love to know what APIs you need to make it work in a more stable way moving forward! Keep those lines of communication open! Appreciate you! |
I've just released eleventy-sass@2.1.6 that should fix all of the issues with @11ty/eleventy-2.0.0-canary.24 and above. And, thank you very much for the opportunity to communicate with you. I don't understand things fully, and let me explain my situation, instead of proposing APIs. Revision hash Issue caused by Actually, this also happens with stub-2258 config. I am not sure what To work around it, eleventy-sass patched |
Can confirm that However, FWIW @zachleat , going back to my original comment opening this issue, changing a post’s status to
. . . although, of course, it’s entirely likely that this is due to PEBKAC on my part. Still, I have pushed the latest to my Eleventy repo in case you want to see whether there’s anything that would help you in the ongoing 2.0.0 dev process. Edit, 2023-01-10: This remains true on 2.0.0-canary.28 and .29, too — BUT I have now seen that it occurs on only a file using the referenced shortcode and macro. If I change the |
Operating system
macOS Ventura v.13.1 (22C65)
Eleventy
2.0.0-canary.21
Describe the bug
With Eleventy 2.0.0-canary.20, the following file...
https://github.com/brycewray/eleventy_site/blob/main/_data/eleventyComputed.js
... controls whether files have permalinks and appear in collections based on their timestamps and
draft
status, as I described in https://www.brycewray.com/posts/2022/12/drafts-timestamp-based-publishing-eleventy/ (earlier today). This doesn’t work fully in dev mode when--incremental
is in use; it adjusts some pages but not others. I had hoped that 2.0.0-canary.21 would correct this, but I’ve found that, instead, it doesn’t work in 2.0.0-canary.21 at all, and that’s with or without--incremental
. Reverting to 2.0.0-canary.20 solved the issue, but still only if--incremental
is not part of the Eleventy command.Reproduction steps
eleventyComputed
(as described above) to control whether files are built and appear in collections, based on theirdraft
status and timestamps within their respective front matter.ELEVENTY_ENV=development npx @11ty/eleventy --serve
. In 2.0.0-canary.20, the site respects the item from step 2. (For example: change an existing Markdown file's timestamp to a future date and/or itsdraft
status totrue
, and this should hide it by killing its permalink and removing it from collections; then revert these changes and the file should reappear.)ELEVENTY_ENV=development npx @11ty/eleventy --serve --incremental
. In 2.0.0-canary.20, the site doesn’t uniformly respect the item from step 2.Expected behavior
With or without
--incremental
in place, files should get permalinks and be in collections — or not — based on how theeleventyComputed
evaluation goes. (But, even if--incremental
remains problematic for the 2.0.0 canaries, the desired behavior absolutely should occur when that switch is not used.)Reproduction URL
https://github.com/brycewray/eleventy_site
Screenshots
No response
The text was updated successfully, but these errors were encountered: