-
Notifications
You must be signed in to change notification settings - Fork 0
Phase 1: Next.js Migration Foundation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
97harsh
wants to merge
12
commits into
master
Choose a base branch
from
nextjs-migration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Initialize Next.js 14.x with TypeScript and Pages Router - Set up project structure (pages, components, lib, styles, contexts) - Implement FontContext for accessibility (replaces 428 lines with 30) - Create core components: * Sidebar (converted from Liquid template) * WelcomeModal (font selection on first visit) * Layout (with Head management) - Copy and preserve existing CSS (Poole, Hyde, Custom, Syntax) - Copy assets to public directory - Configure static export for GitHub Pages compatibility Features working: ✅ Font toggle system (Default ↔ OpenDyslexic) ✅ Welcome modal with localStorage persistence ✅ Sidebar navigation ✅ Responsive design ✅ Type-safe with TypeScript ✅ Minimal dependencies (8 core packages) Next: Phase 2 - Content migration (14 blog posts) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Track progress and next steps for Next.js migration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Vercel requires Node.js 20.x or higher (18.x is discontinued) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…generation - Remove conditional rendering that broke Provider - Return default values from useFont during SSR - Fixes: 'useFont must be used within FontProvider' error during build 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Document workflow for creating feature branches and PRs targeting nextjs-migration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Issues fixed: - Modal checks localStorage directly on mount (more reliable) - ESC key now saves 'default' preference instead of just closing - Added mounted state to avoid hydration issues - Modal won't reappear on new tabs/pages after choice is made Behavior: - Shows once per user (stored in localStorage 'hasChosenFont') - Persists across tabs, page reloads, and sessions - ESC key = choose default font (not just dismiss) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix: Welcome modal persistence across tabs and sessions
Implemented complete content system with all blog posts: **Content:** - ✅ Copied 12 published posts from Jekyll _posts/ - ✅ Excluded 2 draft posts (draft-*.md) - ✅ All markdown files preserved with frontmatter **Core System (lib/posts.ts):** - getAllPosts() - Returns all posts sorted by date (newest first) - getPostBySlug() - Get single post with HTML conversion - getPostsByTag() - Filter posts by tag - getPostsByType() - Filter by type (blog/project) - getAllTags() - Get unique tags for tag pages - getPaginatedPosts() - Pagination support (5 posts/page) - getRelatedPosts() - Find related posts by shared tags - Type-safe frontmatter with TypeScript validation - Markdown to HTML conversion with remark - Draft filtering (excludes draft-*.md files) **Pages:** - pages/posts/[slug].tsx - Dynamic post pages with: * Full post content rendered * Meta tags for SEO * Related posts sidebar (3 posts) * Tag links * Formatted dates - pages/index.tsx - Homepage with: * Latest 5 posts * Post cards with title, date, description, tags * Pagination controls (if >5 posts) * "Read more" links **Components:** - PostCard.tsx - Post preview card component: * Title with link to full post * Formatted date * Description * Tags with links * "Read more" link * Responsive styling **Features:** - ✅ Type-safe frontmatter validation at build time - ✅ URL structure: /posts/[slug] (clean URLs) - ✅ Pagination ready (5 posts per page) - ✅ Related posts based on shared tags - ✅ Tag filtering prepared for Phase 3 - ✅ SEO meta tags - ✅ Responsive design - ✅ Static generation (all at build time) **Posts Migrated (12):** 1. 2024-05-05-tfjs-webcam-classify 2. 2023-08-29-job-links 3. 2023-08-27-finding-new-jobs-using-aws-lambda 4. 2023-08-24-llm-with-semantic-search 5. 2023-08-24-embeddings 6. 2023-09-07-using-google-scripts 7. 2023-04-10-elysium-robot 8. 2023-03-15-submodularity 9. 2023-03-13-linear-programming 10. 2023-03-10-image-classification-cifar10 11. 2023-02-26-route-optimization 12. 2022-06-25-contradictory-claims **Next:** Phase 3 will add tag pages, pagination pages, and static pages (About, Resume, Certifications) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Posts without date field in frontmatter now use filename date - Added safety check in PostPage to handle null posts - Better error logging for invalid frontmatter 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Icons now display correctly in both font modes - Added CSS rules to exclude FA icons from font override - GitHub, LinkedIn, Email, Resume icons work properly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Phase 2: Content Migration - All Blog Posts
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 introduces the foundation for migrating from Jekyll to Next.js 14.x with a stability-first architecture optimized for minimal ongoing maintenance.
What's Included
✅ Phase 1: Foundation Setup (COMPLETE)
Core Infrastructure:
Components Created:
FontContext (contexts/FontContext.tsx)
Sidebar (components/Sidebar.tsx)
WelcomeModal (components/WelcomeModal.tsx)
Layout (components/Layout.tsx)
Features Working:
Assets:
📁 Project Structure
🎯 Success Criteria (Phase 1)
Testing Instructions
Local Testing
Build Test
Validation
Architecture Decisions
1. Pages Router (NOT App Router)
2. 100% Static Site Generation
3. Minimal Dependencies (8 total)
Dependencies:
4. Keep Existing CSS
5. React Context (No Redux/Zustand)
Next Phases (Not in this PR)
Phase 2: Content Migration
Phase 3: Features
Phase 4: TensorFlow.js & Games
Phase 5: Deploy & Optimize
Files Changed
Breaking Changes
None - This is a new directory, Jekyll site still works on master branch.
Migration Strategy
Documentation
Why This Minimizes Maintenance
Estimated Maintenance Post-Migration
Checklist
Next Steps After Merge
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com