-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
renderFile of a WebC include within a draft fails on build #59
Comments
The issue is caused by the "draft" feature, or more specifically, when A workaround is to add a guard to eleventy-plugin-bundle to check if |
Excluded files (permalink: false) won't be rendered, hence bundling of CSS/JS resources is not required. This change not only improves the build performance, it fixes a bug where "renderFile" with WebC fails for excluded files (e.g. drafts). Fixes: 11ty#59
I've had a workaround to delete draft posts on CI before building 11ty, but for unrelated reasons this workaround is no longer viable for me. As already mentioned, a quick fix would be to check in I've created a pull request with a fix: #93 |
Running
eleventy
fails when including a WebC file withrenderFile
in a file that is excluded from collections.I have reproduced the issue within eleventy-base-blog by applying the following commit:
darekkay/eleventy-base-blog@f60f881
As the demo displays, the issue occurs when including a
webc
file usingrenderFile
:It works fine when running
npm run start
(i.e. the dev server), by opening fifthpost:But it fails with
npm run build
:The issue is "fixed" when the
renderFile
line is removed.The issue does not happen when including a markdown file (as presented in the same demo).
Reproducible on:
The text was updated successfully, but these errors were encountered: