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

Simplify excerpt condition #64

Closed
wants to merge 1 commit into from
Closed

Simplify excerpt condition #64

wants to merge 1 commit into from

Conversation

qwtel
Copy link
Collaborator

@qwtel qwtel commented Jul 12, 2020

Currently, we are checking the document type for "posts" and then call generate_excerpt? to determine if the excerpt should be updated.

It's much better to just check for the presence of data["excerpt"] and update it if it is available.

This should also allow this plugin to work with page excerpts introduced in Jekeyll 4.

Finally, this brings the excerpt logic in line with benbalter/jekyll-relative-links#65

@benbalter
Copy link
Owner

How would this behave if excerpt_separator is modified globally or per-document (what generate_excerpt? looks to today)?

@qwtel
Copy link
Collaborator Author

qwtel commented Jul 14, 2020

Hmm, good question. My thinking was that checking data["excerpt"] would side-step all these issues. I'll look up jekyll source to confirm.

@stale
Copy link

stale bot commented Sep 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants