Skip to content

No layouts for excerpt#1339

Merged
mattr- merged 16 commits into
masterfrom
no-layouts-for-excerpt
Jul 24, 2013
Merged

No layouts for excerpt#1339
mattr- merged 16 commits into
masterfrom
no-layouts-for-excerpt

Conversation

@parkr

@parkr parkr commented Jul 22, 2013

Copy link
Copy Markdown
Member

Aims to fix #1321.

  • Don't put excerpts in layouts
  • Convert layouts with converter
  • Render liquid
  • Write tests so it never happens again
  • Fix shitty tests so it really never happens again

Comment thread lib/jekyll/post.rb

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mattr- The key to get it to convert was to make sure Post#excerpt was not called before the excerpt was converted. This seems to fix all the things!

@parkr

parkr commented Jul 22, 2013

Copy link
Copy Markdown
Member Author

@benbalter this will likely be my last PR for v1.1.1 so we can get it shipped today or (at the very latest) tomorrow.

Comment thread features/post_excerpts.feature Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/sitej/site/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should this be {{ post.excerpt }} for consistency?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, the variable used in the layout is page, not post

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😕 Why is it page and not post? Seems weird to me.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's to be consistent so you can use the same layout for pages and for posts if you want.

Always the same variable for the #to_liquid hash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, got it. Merging shortly.

@mattr-

mattr- commented Jul 22, 2013

Copy link
Copy Markdown
Member

Just the one fixup and I think this should be good.

@parkr

parkr commented Jul 23, 2013

Copy link
Copy Markdown
Member Author

@mattr- Please merge when ready :)

@parkr parkr mentioned this pull request Jul 23, 2013
mattr- added a commit that referenced this pull request Jul 24, 2013
@mattr- mattr- merged commit d68d29c into master Jul 24, 2013
mattr- added a commit that referenced this pull request Jul 24, 2013
@parkr parkr deleted the no-layouts-for-excerpt branch July 24, 2013 19:47
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.

Excerpts include layout!

5 participants