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

Disable automatically-generated excerpts with option #1386

Merged
merged 8 commits into from Aug 8, 2013

Conversation

Projects
None yet
5 participants
@parkr
Member

parkr commented Aug 6, 2013

If excerpt_separator is set to "", automatically-extracted excerpts are not
generated and replaced with just an empty string.

Ref: #1380, #933, #837, #1339, #1302, #1033, #1321, #1307

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Aug 6, 2013

Member

@benbalter Thoughts?

Member

parkr commented Aug 6, 2013

@benbalter Thoughts?

@jneander

This comment has been minimized.

Show comment
Hide comment
@jneander

jneander Aug 6, 2013

This one looks good to me. Disabling excerpts is a fair expectation when the separator is explicitly empty.

jneander commented Aug 6, 2013

This one looks good to me. Disabling excerpts is a fair expectation when the separator is explicitly empty.

Show outdated Hide outdated lib/jekyll/post.rb
end
def should_generate_excerpt?
!(site.config['excerpt_separator'].to_s == "")

This comment has been minimized.

@mattr-

mattr- Aug 7, 2013

Member

!(site.config['excerpt_separator'].to_s.empty?) instead?

@mattr-

mattr- Aug 7, 2013

Member

!(site.config['excerpt_separator'].to_s.empty?) instead?

This comment has been minimized.

@parkr

parkr Aug 7, 2013

Member

Fixed!

@parkr

parkr Aug 7, 2013

Member

Fixed!

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Aug 7, 2013

Member

Need to add tests for this and then we're good. :D

Member

parkr commented Aug 7, 2013

Need to add tests for this and then we're good. :D

Show outdated Hide outdated lib/jekyll/post.rb
@@ -255,7 +255,9 @@ def render(layouts, site_payload)
"page" => self.to_liquid(EXCERPT_ATTRIBUTES_FOR_LIQUID)
}.deep_merge(site_payload)
self.extracted_excerpt.do_layout(payload, {})
if should_generate_excerpt?

This comment has been minimized.

@mattr-

mattr- Aug 7, 2013

Member

generate_excerpt? instead?

Shorter, and seems more idiomatic to leave off the qualifiers such as is_ and should_

@mattr-

mattr- Aug 7, 2013

Member

generate_excerpt? instead?

Shorter, and seems more idiomatic to leave off the qualifiers such as is_ and should_

This comment has been minimized.

@parkr

parkr Aug 7, 2013

Member

Sure!

@parkr

parkr Aug 7, 2013

Member

Sure!

@benbalter

This comment has been minimized.

Show comment
Hide comment
@benbalter

benbalter Aug 8, 2013

Contributor

👍

Contributor

benbalter commented Aug 8, 2013

👍

@mattr-

This comment has been minimized.

Show comment
Hide comment
@mattr-

mattr- Aug 8, 2013

Member

💥 test added.

Member

mattr- commented Aug 8, 2013

💥 test added.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Aug 8, 2013

Member

Test looks good! Thanks for doing that.

Member

parkr commented Aug 8, 2013

Test looks good! Thanks for doing that.

parkr added a commit that referenced this pull request Aug 8, 2013

Merge pull request #1386 from mojombo/disable-excerpts
Disable automatically-generated excerpts with option

@parkr parkr merged commit bc3dccf into master Aug 8, 2013

1 check passed

default The Travis CI build passed
Details

@parkr parkr deleted the disable-excerpts branch Aug 8, 2013

parkr added a commit that referenced this pull request Aug 8, 2013

SLaks added a commit to SLaks/SLaks.Blog that referenced this pull request Aug 9, 2013

Disable excerpts
Workaround for jekyll/jekyll#1380, jekyll/jekyll#1401.

Should be reverted after jekyll/jekyll#1386 is released.

parkr referenced this pull request Aug 23, 2013

Fix TypeError on Generation
After several page build fails, this seems to have fixed up the following error:

lib/jekyll/excerpt.rb:108:in `partition': type mismatch: NilClass given (TypeError)

@benbalter benbalter referenced this pull request Jul 28, 2016

Merged

Enable site excerpts #5150

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