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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow excerpts to be generated for Page objects #7642

Merged
merged 6 commits into from May 21, 2020
Merged

Conversation

ashmaroli
Copy link
Member

  • This is a 馃檵 feature or enhancement.

Summary

Allow excerpts to be generated for Jekyll::Page objects.

Currently just a bare-bones feature, {{ page.excerpt }} for a Jekyll::Page will yield just the rendered output string of the Page's excerpt-source.

Context

Resolves #6778

@mattr- mattr- added this to the 4.1 milestone May 2, 2019
@DirtyF DirtyF added this to In progress in Jekyll 4.1 May 2, 2019
@DirtyF DirtyF added this to In progress in Jekyll 4.1 Aug 14, 2019
@DirtyF DirtyF moved this from In progress to To do in Jekyll 4.1 Mar 17, 2020
@DirtyF DirtyF moved this from To do to In progress in Jekyll 4.1 Mar 17, 2020
Copy link
Member

@mattr- mattr- left a comment

Choose a reason for hiding this comment

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

If this is ready to go, can we move it out of draft and into ready for review?

@ashmaroli
Copy link
Member Author

Unfortunately since this breaks existing builds, it is not ready to move out of the draft status.

@DirtyF DirtyF modified the milestones: 4.1, flexible Apr 13, 2020
@DirtyF DirtyF removed this from In progress in Jekyll 4.1 Apr 13, 2020
@ashmaroli ashmaroli marked this pull request as ready for review May 20, 2020 12:22
@ashmaroli ashmaroli requested a review from a team May 20, 2020 12:23
@ashmaroli ashmaroli modified the milestones: flexible, 4.1 May 20, 2020
@ashmaroli
Copy link
Member Author

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit 1ec3843 into master May 21, 2020
@jekyllbot jekyllbot deleted the page-excerpts branch May 21, 2020 08:44
jekyllbot added a commit that referenced this pull request May 21, 2020
@seth-reeser
Copy link

Hello, this had an unintended consequence, I would recommend stripping html, stripping newlines, and even maybe truncating. I was using page.excerpt as a meta description entry:

<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">

In an example of an excerpt not being defined for a page, this would have evaluated to the site.description, but now I'm getting markup generated for me that breaks because of HTML being included.

@ashmaroli
Copy link
Member Author

@seth-reeser Please open a new issue ticket and include the expected and actual results in the ticket for a discussion.

@jekyll jekyll locked and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Jekyll 4.1
  
In progress
Development

Successfully merging this pull request may close these issues.

Allow Jekyll::Page objects to render {{ page.excerpt }} with relevant content
5 participants