-
Notifications
You must be signed in to change notification settings - Fork 207
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 skipping generation in development #346
Allow skipping generation in development #346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good example of a "power-user" feature – one that most folks won't need but that can help for those with big sites. You just have to remember to set JEKYLL_ENV=production when building your site to push out to the world with this option on!
I think we can iterate on the flag name, otherwise things look good.
|
||
```yml | ||
feed: | ||
skip_development: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could improve this name a bit. What do you think about disable_in_development
or skip_in_development
?
@@ -8,6 +8,8 @@ class Generator < Jekyll::Generator | |||
# Main plugin action, called by Jekyll-core | |||
def generate(site) | |||
@site = site | |||
return if config["skip_development"] == true && Jekyll.env == "development" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's log in this case so it's clear to the user what's happening. Something like:
Jekyll.logger.info "Jekyll Feed:", "Skipping feed generation in development"
Fixed by #370! |
No worries, thanks for getting us all started! |
Fix #331