mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
16 lines
No EOL
359 B
Ruby
16 lines
No EOL
359 B
Ruby
collection :articles,
|
|
where: proc { |resource|
|
|
uri_match resource.url, 'blog/{year}-{month}-{day}-{title}.html'
|
|
}
|
|
|
|
collection :tags,
|
|
where: proc { |resource|
|
|
resource.data.tags
|
|
},
|
|
group_by: proc { |resource|
|
|
if resource.data.tags.is_a? String
|
|
resource.data.tags.split(',').map(&:strip)
|
|
else
|
|
resource.data.tags
|
|
end
|
|
} |