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

Add a group_by filter. #1738

Closed
wants to merge 5 commits into from
Closed

Add a group_by filter. #1738

wants to merge 5 commits into from

Conversation

parkr
Copy link
Member

@parkr parkr commented Nov 20, 2013

CAUTION: current code is total crap. Don't code tired, kiddies.

#1735

@parkr
Copy link
Member Author

parkr commented Nov 20, 2013

@mattr- I think I'm going to need your thoughts on this one. Code could definitely be loads better but my tired mind isn't interested in building it right now.

@parkr
Copy link
Member Author

parkr commented Nov 20, 2013

Also /cc @haacked

# {"name" => "larry"
# "items" => [...] } # all the items where `property` == "larry"
def group_by(input, property)
if input.respond_to?(:group_by)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps:

if groupable?(input)

where groupable is defined as:

def groupable?(element)
  element.respond_to?(:group_by)
end

@parkr
Copy link
Member Author

parkr commented Dec 5, 2013

@mattr- Did everything else look OK to you?

@mattr-
Copy link
Member

mattr- commented Dec 6, 2013

I think so. I'll look at it again.

@parkr
Copy link
Member Author

parkr commented Dec 6, 2013

@mattr- Awesome, thanks! Please comment on the weird spots or merge if it's good. :)

Move jekyllrb.com CSS to includes & Update Normalize.css to v2.1.3
…p-by-filter

* 'group-by-filter' of github.com:mojombo/jekyll:
  Add groupable? method, props @mattr-
  First (terrible) pass at a group_by filter.
@parkr parkr closed this Dec 8, 2013
@parkr parkr deleted the group-by-filter branch December 8, 2013 06:13
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
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.

None yet

3 participants