Skip to content

feat: load the sidebar data and titles/excerpts from the blog post markdown document and its frontmatter - #2981

Merged
pd93 merged 1 commit into
mainfrom
load-blog-post-data-from-md
Aug 16, 2026
Merged

feat: load the sidebar data and titles/excerpts from the blog post markdown document and its frontmatter#2981
pd93 merged 1 commit into
mainfrom
load-blog-post-data-from-md

Conversation

@pd93

@pd93 pd93 commented Aug 15, 2026

Copy link
Copy Markdown
Member

Description

This PR updates the way blog posts are loaded to the Task website. Currently, each blog post has to be added as a markdown document, then added to the sidebar and blog index independently. This PR changes this so that only the markdown document is required.

We use gray-matter) to extract frontmatter from the markdown document and load it dynamically into the sidebar. A function was also added to render and cut an excerpt of text from the markdown document to use as a preview on the blog index page. This works by extracting the text up to the <!-- more --> comment.

I'm going to leave this as a draft until after #2979 is merged since there are likely to be conflicts.

AI Disclosure

Assisted by Claude Code to recommend the best approach to loading the frontmatter (via gray-matter) and to write the buildBlogSidebar function and blog.data.ts file.

Checklist

  • I have read and followed the Contribution Guide.
  • I have disclosed the use of any AI-generated content in this pull request per the AI Usage Policy.
  • I fully understand the changes and have hand-written the description (No AI) of this pull request.

@pd93
pd93 marked this pull request as ready for review August 15, 2026 16:53
@pd93
pd93 requested review from andreynering and vmaerten and removed request for vmaerten August 15, 2026 16:53

@vmaerten vmaerten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!
Way easier now 🚀

@pd93
pd93 merged commit 1d0719b into main Aug 16, 2026
20 checks passed
@pd93
pd93 deleted the load-blog-post-data-from-md branch August 16, 2026 11:14
pd93 added a commit that referenced this pull request Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants