Refactor Site#render #1638

Merged
merged 3 commits into from Oct 17, 2013

Projects

None yet

2 participants

@maul-esel
Contributor

Shorten and simplify the code in Site#render, removing duplication.

@mattr- mattr- commented on an outdated diff Oct 17, 2013
lib/jekyll/site.rb
@@ -389,7 +386,7 @@ def aggregate_post_info(post)
end
def relative_permalinks_deprecation_method
- if config['relative_permalinks'] && !@deprecated_relative_permalinks
+ if config['relative_permalinks'] && self.pages.any? { |page| page.uses_relative_permalinks }
@mattr-
mattr- Oct 17, 2013 Member

I think self.pages.any? { |page| page.uses_relative_permalinks } could use its own method.

@mattr-
Member
mattr- commented Oct 17, 2013

One tiny little nitpick, but 👍

@maul-esel
Contributor

@mattr- Done!

@mattr-
Member
mattr- commented Oct 17, 2013

❤️

@mattr- mattr- merged commit 1fd549c into jekyll:master Oct 17, 2013

1 check was pending

default The Travis CI build is in progress
Details
@maul-esel maul-esel deleted the maul-esel:render-page-or-post branch Oct 17, 2013
@mattr- mattr- added a commit that referenced this pull request Oct 17, 2013
@mattr- mattr- Update history to reflect merge of #1638 6e77788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment