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 support for liquid in post excerpts #1302

Merged
merged 2 commits into from
Jul 14, 2013
Merged

Add support for liquid in post excerpts #1302

merged 2 commits into from
Jul 14, 2013

Conversation

parkr
Copy link
Member

@parkr parkr commented Jul 13, 2013

  • Break out Excerpt into its own class, including Convertible
  • Hook excerpt rendering into post rendering
  • Fix post tests for excerpts so they render instead of just transform
  • Write tests specifically for Excerpt??

@mattr-

@parkr
Copy link
Member Author

parkr commented Jul 13, 2013

@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|
Copy link
Member

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?

Copy link
Member Author

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!

Copy link
Member Author

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 ;) ❤️

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed it in d815c12 :)

@mattr-
Copy link
Member

mattr- commented Jul 14, 2013

I love the extraction of the extract class here. That is fantastic.

We can add tests for Excerpt later, if needed, since it's just an implementation detail of a post.

I'm 👍 on this.

mattr- added a commit that referenced this pull request Jul 14, 2013
Add support for liquid in post excerpts
@mattr- mattr- merged commit 17c2296 into master Jul 14, 2013
mattr- added a commit that referenced this pull request Jul 14, 2013
@parkr parkr deleted the excerpt branch July 14, 2013 02:14
@@ -260,6 +252,8 @@ def render(layouts, site_payload)
"page" => self.to_liquid
}.deep_merge(site_payload)

self.extracted_excerpt.do_layout(payload, layouts)
Copy link

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

@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

4 participants