creativecommons.github.io-source icon indicating copy to clipboard operation
creativecommons.github.io-source copied to clipboard

[Feature] Add excerpts to blog

Open Queen-codes opened this issue 1 year ago • 2 comments

Problem

vocab-refresh: The current blog post design does not include excerpts which doesn't allow for readers to get a preview of the content they are about to read.

Description

Introduce excerpts for blog posts, potentially stripped to the first 100 characters to reduce clutter, also to place excerpts below the byline for better organization and readability.

Implementation

  • [x] I would be interested in implementing this feature.

Queen-codes avatar Jan 29 '25 14:01 Queen-codes

Issue: Excerpts not visible after changes to posts.html

Hi maintainers!

I’ve been working on adding excerpts to blog posts as described in the issue #XYZ. During my investigation, I noticed that the posts.html template already includes an excerpt logic:

Image

This suggests the feature is partially implemented, but I’m not seeing the excerpts rendered visually on the blog listing page despite making changes here.

What I’ve tried:

Modified posts.html to adjust the excerpt styling (e.g., added CSS classes).

Ran the project locally and tested with sample blog posts.

Verified that post.body contains valid content in the data source (e.g., Markdown files).

Questions:

Is posts.html the correct file to focus on for this issue, or should I also modify blog.html (single post page)?

Since the excerpt logic exists but isn’t visible, could this be due to:

CSS styling issues (e.g., .excerpt class not styled properly)?

Data field mismatches (e.g., post.body vs. post.content)?

Are there existing tests or debugging steps I should follow to diagnose why the excerpt isn’t rendering?

I’d appreciate guidance on whether I’m missing something here or if the problem lies elsewhere. Happy to iterate further!

Ayush991rec avatar Feb 04 '25 12:02 Ayush991rec

Hi @Ayush991rec I think the reason why excerpts aren't being rendered visually is because no author has included the excerpt field in their blog posts yet.

Queen-codes avatar Feb 05 '25 10:02 Queen-codes