Allow override of page excerpt in heading (via tagline) #2307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an enhancement or feature.
Summary
Allow the use of
page.tagline
to overridepage.excerpt
in heading area.I want to have some custom text that more resembles a "description" of the article in the header area that's designated for the excerpt. However, manually overriding
page.excerpt
in front matter also changes the excerpt displayed in blog menu / pagination pages, which is a rather undesired impact. Using another variable likepage.tagline
to override this makes it easier to handle and more flexible to use.For example, the text [Developer, system administrator, geek] on my front page is actually specified as
page.excerpt
:https://github.com/iBug/iBug-source/blob/9837ea293a154b154404a18d533341dc93199cb5/index.md#L3
Context
Not related to any existing GitHub issue. My motivation is exactly as said: The need to customize this part of the theme. Since
excerpt
is by default automatically gathered from the first few characters of the content, it's less sensible to repeat the exact stuff in page heading.Rest assured,
tagline
isn't a special variable (not touched by Jekyll, unlikeexcerpt
which may be automatically generated) and is only specified manually. I picked this name because a few other themes also uses the same name (example) and it's sure to be free of confusion.