-
Couldn't load subscription status.
- Fork 152
Don't double-process the site.github namespace. #95
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
Conversation
|
|
||
| def generate(site) | ||
| if defined?(@_already_generated) | ||
| Jekyll::GitHubMetadata.log :debug, "Nothing left to do!" |
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.
We already are exposing users to unnecessary friction with unclear output, I'd suggest making it clear what's going on here.
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.
Agreed – I'm just going to nix it.
| attr_reader :site | ||
|
|
||
| def generate(site) | ||
| if defined?(@_already_generated) |
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.
Could we hook into after_init instead?
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.
after_init was introduced only a few versions ago so this would stop working for older versions. Probably fine, but just calling that out.
In the GitHub Pages gem, we call the configuration reset in after_reset, which is called towards the top. Does that seem OK?
|
Is it possible to tests this? |
14f143c to
ba830fd
Compare
|
@benbalter Can you please take another look?
Uhhhh I guess call it twice for the same site and make sure it doesn't call anything? |
| end | ||
|
|
||
| Jekyll::Hooks.register :site, :after_reset do |site| | ||
| Jekyll::GitHubMetadata::SiteGitHubMunger.munge(site) |
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.
Would after_init save us from having to check if we've already processes it (since it only fires once)?
|
Using |
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.
nice!
|
@jekyllbot: merge |
Should fix #93 (comment)