Adds excerpt to posts #837

Merged
merged 2 commits into from Mar 17, 2013

Conversation

Projects
None yet
6 participants
@ixti
Member

ixti commented Mar 4, 2013

This is a rebased version of #727 with corrections requested by @mojombo

@iotize

This comment has been minimized.

Show comment
Hide comment
@iotize

iotize Mar 9, 2013

👍 would love to see this merged.

iotize commented Mar 9, 2013

👍 would love to see this merged.

@AlexanderEkdahl

This comment has been minimized.

Show comment
Hide comment
@AlexanderEkdahl

AlexanderEkdahl Mar 10, 2013

Contributor

Cool idea however this would likely mess up a lot of old posts and would result in the loss of the first paragraph. I'd say this should be a plugin rather than a jekyll feature.

Contributor

AlexanderEkdahl commented Mar 10, 2013

Cool idea however this would likely mess up a lot of old posts and would result in the loss of the first paragraph. I'd say this should be a plugin rather than a jekyll feature.

@ixti

This comment has been minimized.

Show comment
Hide comment
@ixti

ixti Mar 10, 2013

Member

@AlexanderEkdahl How does it mess old posts? It just adds extra property excerpt to a post which is not obligatory to use.

Member

ixti commented Mar 10, 2013

@AlexanderEkdahl How does it mess old posts? It just adds extra property excerpt to a post which is not obligatory to use.

@AlexanderEkdahl

This comment has been minimized.

Show comment
Hide comment
@AlexanderEkdahl

AlexanderEkdahl Mar 11, 2013

Contributor

My bad. I thought it removed the first paragraph and put it in the excerpt variable.

I like it and need it for one of my sites. However, I'd still rather have it as a monkey-patch-plugin 😈

Contributor

AlexanderEkdahl commented Mar 11, 2013

My bad. I thought it removed the first paragraph and put it in the excerpt variable.

I like it and need it for one of my sites. However, I'd still rather have it as a monkey-patch-plugin 😈

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 11, 2013

Member

@ixti I'm 👍 on this, but before I merge, what's the performance impact of this?

Member

parkr commented Mar 11, 2013

@ixti I'm 👍 on this, but before I merge, what's the performance impact of this?

@ixti

This comment has been minimized.

Show comment
Hide comment
@ixti

ixti Mar 13, 2013

Member

@parkr I don't know "exact numbers". It's needed to be tested on real big data. In general impact will be insignificant.

Member

ixti commented Mar 13, 2013

@parkr I don't know "exact numbers". It's needed to be tested on real big data. In general impact will be insignificant.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 16, 2013

Member

If I have a lot of long posts, it'll probably be a significant performance impact. But, like you said, we need exact numbers.

Would you please update the documentation (in ./site) with this feature?

Member

parkr commented Mar 16, 2013

If I have a lot of long posts, it'll probably be a significant performance impact. But, like you said, we need exact numbers.

Would you please update the documentation (in ./site) with this feature?

@mojombo

View changes

lib/jekyll/post.rb
+ # [1]: http://example.com/
+ #
+ # This is fairly good option for Markdown and Textile files. But might cause
+ # problems for HTML posts (which is quiet unusual for Jekyll). If default

This comment has been minimized.

@mojombo

mojombo Mar 17, 2013

Contributor

Spelling error: quiet should be quite.

@mojombo

mojombo Mar 17, 2013

Contributor

Spelling error: quiet should be quite.

@mojombo

View changes

lib/jekyll/post.rb
self.data['layout'] = 'post' unless self.data.has_key?('layout')
- self.data
+ nil

This comment has been minimized.

@mojombo

mojombo Mar 17, 2013

Contributor

No need to explicitly return nil on methods marked as Returns nothing.. Just let it return whatever the last statement returns, the docs tell people not to trust the contents of the returned value for anything.

@mojombo

mojombo Mar 17, 2013

Contributor

No need to explicitly return nil on methods marked as Returns nothing.. Just let it return whatever the last statement returns, the docs tell people not to trust the contents of the returned value for anything.

@mojombo

View changes

lib/jekyll/post.rb
+ def transform
+ super
+ self.excerpt = converter.convert(self.excerpt)
+ nil

This comment has been minimized.

@mojombo

mojombo Mar 17, 2013

Contributor

No need for explicit nil return. Just delete this line (see above comment).

@mojombo

mojombo Mar 17, 2013

Contributor

No need for explicit nil return. Just delete this line (see above comment).

@ixti

This comment has been minimized.

Show comment
Hide comment
@ixti

ixti Mar 17, 2013

Member

@mojombo Fixed typo and explicit nil returns.
@parkr I don't know where to put that documentation (which section/post).

Member

ixti commented Mar 17, 2013

@mojombo Fixed typo and explicit nil returns.
@parkr I don't know where to put that documentation (which section/post).

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 17, 2013

Member

Looks great to me! Your method documentation is enough of a starting point for us to update the site. Thanks man!

Member

parkr commented Mar 17, 2013

Looks great to me! Your method documentation is enough of a starting point for us to update the site. Thanks man!

parkr added a commit that referenced this pull request Mar 17, 2013

@parkr parkr merged commit 936ed1f into jekyll:master Mar 17, 2013

1 check passed

default The Travis build passed
Details

parkr added a commit that referenced this pull request Mar 17, 2013

@ixti

This comment has been minimized.

Show comment
Hide comment
@ixti

ixti Mar 17, 2013

Member

Awesome! Thanks!

Member

ixti commented Mar 17, 2013

Awesome! Thanks!

@parkr parkr referenced this pull request Dec 16, 2016

Closed

Post Excerpt Includes Footnotes #5659

5 of 17 tasks complete

@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.