Applying a more 'Ruby' style to post_url.rb
This commit is contained in:
parent
800bd290ec
commit
5af8e1f40c
|
@ -23,8 +23,12 @@ module Jekyll
|
||||||
site = context.registers[:site]
|
site = context.registers[:site]
|
||||||
|
|
||||||
site.posts.each do |p|
|
site.posts.each do |p|
|
||||||
if p.slug == @post.slug and p.date.year == @post.date.year and p.date.month == @post.date.month and p.date.day == @post.date.day
|
if p.slug == @post.slug
|
||||||
return p.url
|
and p.date.year == @post.date.year
|
||||||
|
and p.date.month == @post.date.month
|
||||||
|
and p.date.day == @post.date.day
|
||||||
|
|
||||||
|
p.url
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue