Refactor excerpt and description handling for consistency#76
Merged
Conversation
- Enable page_excerpts in _config.yml so Jekyll auto-generates
page.excerpt for pages (not just posts)
- resource.html: move description from body to header hgroup subtitle;
resources use description in front matter, not excerpt, so the old
header check was dead code
- project.html: remove dead {% if page.description %} body block;
projects use excerpt (shown in header), description was never set
- jsonld.html: fix meetup Event description, which was always empty
since meetups have no description front matter field; fall back to
page content stripped and truncated to 50 words
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes inconsistent use of
excerptanddescriptionfields across layouts and JSON-LD. Two fields serve distinct roles:excerpt— short tagline, shown in<hgroup>subtitle and card listingsdescription— longer body copy, shown in main content areaChanges
_config.yml: Addpage_excerpts: trueso Jekyll 4.1.1+ auto-generatespage.excerptfor pages (not just posts), enabling the subtitle inpage.htmlto render without requiring manual front matter_layouts/resource.html: Movedescriptionfrom body section to<hgroup>subtitle — resources usedescriptionin front matter (notexcerpt), so the old header check was always dead; description is a one-liner that belongs in the subtitle position_layouts/project.html: Remove dead{% if page.description %}body block — projects useexcerpt(already shown in the header);descriptionwas almost never set in project front matter_includes/jsonld.html: Fix meetupEventSchema.org description — was always outputting an empty string because meetups have nodescriptionfront matter field; now falls back to page body content (stripped, truncated to 50 words)Test plan
descriptionfield is now populatedexcerptin front matter still render subtitle correctlyCloses #63