mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
Migrated from trying-to-understand-drops v3
@@ -21,7 +21,8 @@ Here are the 'drops'
|
|||||||
@options = options
|
@options = options
|
||||||
@liquid.update \
|
@liquid.update \
|
||||||
'body' => @source.body_html,
|
'body' => @source.body_html,
|
||||||
'excerpt' => (@source.excerpt_html.nil? || @source.excerpt_html.empty? ? nil : @source.excerpt_html),
|
'excerpt' => (@source.excerpt_html.nil? ||
|
||||||
|
@source.excerpt_html.empty? ? nil : @source.excerpt_html),
|
||||||
'accept_comments' => @source.accept_comments?,
|
'accept_comments' => @source.accept_comments?,
|
||||||
'is_page_home' => (options[:page] == true)
|
'is_page_home' => (options[:page] == true)
|
||||||
end
|
end
|
||||||
@@ -35,7 +36,8 @@ Here are the 'drops'
|
|||||||
end
|
end
|
||||||
|
|
||||||
def sections
|
def sections
|
||||||
@sections ||= @source.sections.inject([]) { |all, s| s.home? ? all : all << s.to_liquid } # your days are numbered, home section!
|
@sections ||= @source.sections.inject([]) { |all, s|
|
||||||
|
s.home? ? all : all << s.to_liquid } # your days are numbered, home section!
|
||||||
@sections ||= liquify(*@source.sections) { |s| s.home? ? nil : s.to_liquid }
|
@sections ||= liquify(*@source.sections) { |s| s.home? ? nil : s.to_liquid }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user