Skip to content
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

Closed

Conversation

henrahmagix
Copy link

Fix #331

Copy link
Member

@parkr parkr left a 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
Copy link
Member

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"
Copy link
Member

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"

@parkr
Copy link
Member

parkr commented Jun 5, 2022

Fixed by #370!

@parkr parkr closed this Jun 5, 2022
@henrahmagix
Copy link
Author

Ah sorry I missed the comments here, thanks so much for your improved replacement @sylhare and thanks for merging @parkr :)

@henrahmagix henrahmagix deleted the allow-skipping-in-development branch June 5, 2022 20:35
@parkr
Copy link
Member

parkr commented Jun 5, 2022

No worries, thanks for getting us all started!

@jekyll jekyll locked and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable feed on dev environment
3 participants