Fix TypeScript build error for blog frontmatter fields#37
Merged
huangyiirene merged 2 commits intocopilot/fix-homepage-font-colorfrom Jan 20, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Remove `as any` type casts from source.config.ts and source.ts - Properly configure fumadocs-mdx blog schema with extended frontmatter fields - Use z.coerce.string() for date field to handle YAML Date objects - Add BlogPostData interface and type assertions in blog page component - Build now passes successfully Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error in workflow step execution
Fix TypeScript build error for blog frontmatter fields
Jan 20, 2026
526ccb0
into
copilot/fix-homepage-font-color
5 checks passed
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.
The CI build was failing because blog posts used custom frontmatter fields (
date,author,tags) that weren't typed in the fumadocs-mdx schema. Type casts (as any) masked this until TypeScript compilation.Changes
source.config.tsdocs.schemaproperty with extended frontmatterz.coerce.string()for date field to handle YAML's auto-parsing to Date objectssource.tsas anycasts to enable type inferencepage.tsxBlogPostDatainterface and type assertions for custom fieldspage.data.bodyaccess for MDX componentOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.