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

Add support for page.description in front matter to become entry <summary> #297

Merged
merged 1 commit into from Dec 16, 2021
Merged

Add support for page.description in front matter to become entry <summary> #297

merged 1 commit into from Dec 16, 2021

Conversation

mohd-akram
Copy link
Contributor

Closes #216.

@ashmaroli ashmaroli requested review from benbalter and a team January 22, 2020 18:54
Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

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

Great addition! Thanks @mohd-akram

@DirtyF DirtyF requested a review from a team February 1, 2020 09:17
@parkr
Copy link
Member

parkr commented Feb 2, 2020

I’m not sure I understand why you would use a different field here, namely why you would use description instead of excerpt. Jekyll allows you to overwrite excerpt in front matter, so why not just overwrite the excerpt for the post or page in question?

@mohd-akram
Copy link
Contributor Author

I use description because it's supported by jekyll-seo-tag (see the issue above) and because overriding excerpt feels weird. title and description together are also analogous to their HTML counterparts.

@benbalter
Copy link
Contributor

👋😄 I came here to request the same feature.

Since Jekyll SEO Tag supports title + description, I add short 1-2 sentence descriptions to each post which serve as a concise summary of the post's content. By using excerpt and only excerpt, Jekyll Feed either only outputs the post body up to the first line break or requires site maintainers to duplicate summaries across both the excerpt and description fields for all posts.

👍 to preferring description if it's present to bring things a bit closer in line with the way Jekyll SEO Tag treats front matter.

@parkr
Copy link
Member

parkr commented Dec 16, 2021

jekyll-seo-tag has a field called "description" which uses page.description then page.excerpt and finally falls back to the site description:

https://github.com/jekyll/jekyll-seo-tag/blob/c658a8dd9d94520c090547b164e643441df8e62f/lib/jekyll-seo-tag/drop.rb#L90-L94

@parkr parkr changed the title Add support for description in front matter Add support for page.description in front matter to become entry <summary> Dec 16, 2021
@parkr
Copy link
Member

parkr commented Dec 16, 2021

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit 10d86bb into jekyll:master Dec 16, 2021
jekyllbot added a commit that referenced this pull request Dec 16, 2021
@mohd-akram mohd-akram deleted the add-description branch December 16, 2021 08:00
benoitf added a commit to benoitf/eclipse-che-blog that referenced this pull request Jan 25, 2022
https://github.com/jekyll/jekyll-feed/releases/tag/v0.16.0

Minor Enhancements
Add support for page.description in front matter to become entry <summary> (#297)
jekyll/jekyll-feed#297
benoitf added a commit to eclipse-che/blog that referenced this pull request Jan 25, 2022
https://github.com/jekyll/jekyll-feed/releases/tag/v0.16.0

Minor Enhancements
Add support for page.description in front matter to become entry <summary> (#297)
jekyll/jekyll-feed#297
@jekyll jekyll locked and limited conversation to collaborators Dec 16, 2022
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.

Use page.description for summary element, falling back to page.excerpt
5 participants