Add blog feature with automatic markdown parsing and rendering#8
Draft
Add blog feature with automatic markdown parsing and rendering#8
Conversation
Co-authored-by: nitrotap <9121718+nitrotap@users.noreply.github.com>
Co-authored-by: nitrotap <9121718+nitrotap@users.noreply.github.com>
Co-authored-by: nitrotap <9121718+nitrotap@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add automatic markdown parsing for blog page
Add blog feature with automatic markdown parsing and rendering
Oct 8, 2025
nitrotap
approved these changes
Oct 11, 2025
nitrotap
reviewed
Oct 11, 2025
| "react-dom": "^19.0.0" | ||
| "react-dom": "^19.0.0", | ||
| "react-markdown": "^10.1.0", | ||
| "remark-gfm": "^4.0.1" |
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.
Overview
This PR adds a complete blog feature to the portfolio website that automatically parses markdown files from the
md/folder and displays them as beautifully formatted blog posts.What's New
Automatic Markdown Parsing
The website now automatically detects and parses any
.mdfiles placed in themd/folder at the project root. No configuration needed - just drop in your markdown files and rebuild!Blog Pages
/blog): Displays all blog posts as cards with titles, excerpts, and "Read more" links/blog/[slug]): Renders each markdown file with proper HTML formatting, including headings, lists, code blocks, links, and moreNavigation Integration
A "Blog" link is automatically added to the main navigation menu, making the blog discoverable from anywhere on the site.
Technical Details
Dependencies Added
react-markdown- Converts markdown to React componentsremark-gfm- Adds GitHub Flavored Markdown supportNew Components
BlogSection.tsx- Renders blog post cards in a responsive gridBlogPostSection.tsx- Renders markdown content with custom Tailwind CSS stylingblogUtils.ts- Utility functions for reading and parsing markdown files from the filesystemMarkdown Features Supported
Static Site Generation
All blog posts are statically generated at build time using Next.js
generateStaticParams, ensuring:How to Use
Adding a new blog post is simple:
.mdfile in themd/folder (e.g.,md/my-post.md)# Headingbecomes the post titlenpm run buildSee
BLOG_FEATURE.mdfor complete documentation.Sample Content
Included 3 sample blog posts demonstrating the feature:
welcome.md- Introduction post with basic formattingnextjs-tips.md- Technical post with code blocks and liststailwind-design.md- Design-focused post with various markdown elementsScreenshots
Blog Listing Page
The blog listing page displays all posts in a clean, responsive grid layout with card-based UI.
Individual Blog Post
Blog posts render markdown with proper typography, syntax-highlighted code blocks, and consistent styling.
Additional Changes
[slug]routes to exclude blog pages, preventing conflictsBuild Status
✅ Build successful - 16 pages generated (including 3 blog posts)
✅ Lint passing - No new errors
✅ Manual testing completed - All features working correctly
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/usr/local/bin/node /home/REDACTED/work/react-folio/react-folio/node_modules/next/dist/compiled/jest-worker/processChild.js(dns block)https://api.github.com/users/nitrotap/repos/usr/local/bin/node /home/REDACTED/work/react-folio/react-folio/node_modules/next/dist/compiled/jest-worker/processChild.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original 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.