-
-
Notifications
You must be signed in to change notification settings - Fork 496
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
Allow custom cli options #355
Comments
If I comment out |
Ah, I don’t think this will probably make it in, unfortunately. This behavior has actually saved my butt a few times when I’ve mistyped a command and it failed immediately without writing files. You can see the decision making behind the behavior here: #66 (Eleventy used to operate how you suggested, but was changed to this model for safety reasons) I’d encourage you to use environment variables instead. We have an example of those in the docs: https://www.11ty.io/docs/data-js/#example%3A-exposing-environment-variables Related discussion in the And this feature is actually our top feature request to include in core, so it will very likely get included in core soon: #188 Sorry, hope that’s not too disappointing of an answer! (Closing.) |
Not disappointing at all, I can live with environment variables :) Really love Eleventy so far 👍 |
I was trying to implement a feature for my site to optionally show drafts (like Jekyll has).
Basically I have a front matter flag on posts:
And if I add
--include-drafts
or--drafts
I could do a check in my eleventy.js to either include or filter out the posts withdraft: true
.Example:
But this is currently not possible because of this check:
https://github.com/11ty/eleventy/blob/master/src/EleventyCommandCheck.js#L73
I think it would make Eleventy even more powerful if it just ignores options it does not recognise so it's possible to add custom functionality with custom options.
The text was updated successfully, but these errors were encountered: