-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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 support for liquid in post excerpts #1302
Conversation
|
@mattr- Please review. I'd love to push this out tomorrow! |
| # | ||
| # Returns the representative Hash. | ||
| def to_liquid | ||
| further_data = Hash[ATTRIBUTES_FOR_LIQUID.map { |attribute| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely up to speed on Ruby's constant lookup. How does this ATTRIBUTES_FOR_LIQUID constant get resolved when it's actually on the Post class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... no I don't think it does. Totally missed that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also don't throw yourself under the bus by saying you're not up to speed - I know that's not true ;) ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it in d815c12 :)
|
I love the extraction of the extract class here. That is fantastic. We can add tests for I'm 👍 on this. |
Add support for liquid in post excerpts
| @@ -260,6 +252,8 @@ def render(layouts, site_payload) | |||
| "page" => self.to_liquid | |||
| }.deep_merge(site_payload) | |||
|
|
|||
| self.extracted_excerpt.do_layout(payload, layouts) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something feels strange right here...
haven't really dug in yet but guessing this is what is causing some serious strangeness with a lot of Jekyll sites since 1.1.0.
See issue #1307
ConvertibleExcerpt??@mattr-