Project Overview: Migrate existing static HTML blog (Hexo-generated) to modern Next.js 16 with App Router, TypeScript, Tailwind CSS, and MDX content system.
Target Deployment: GitHub Pages at sonicdmg.github.io
Current State Analysis:
- 8 blog posts from 2017-2018 (Technical, Aerial, Something Else categories)
- Static HTML files with embedded content
- Custom CSS styling with banner images
- Tags: datastax, killrvideo, aerial, raspberry-PI, etc.
- Social links: GitHub, Twitter, LinkedIn, YouTube
- Google Analytics integration
- Disqus comments
- Technology Stack
- Project Architecture
- File Structure
- Implementation Phases
- Configuration Files
- Deployment Workflow
- Next.js: 16.0.0 (App Router)
- React: 19.0.0
- TypeScript: 5.7.0
- Node.js: 20.x LTS
- Tailwind CSS: 4.0.0
- PostCSS: 8.4.x
- clsx: 2.1.x
- tailwind-merge: 2.5.x
- @next/mdx: 16.0.0
- @mdx-js/loader: 3.1.0
- @mdx-js/react: 3.1.0
- gray-matter: 4.0.3
- remark-gfm: 4.0.0
- rehype-slug: 6.0.0
- rehype-autolink-headings: 7.1.0
- rehype-pretty-code: 0.15.0
- shiki: 1.22.0
- flexsearch: 0.7.43
- date-fns: 4.1.0
- next-sitemap: 4.2.3
- feed: 4.2.2
app/
├── layout.tsx # Root layout
├── page.tsx # Home page
├── about/page.tsx # About page
├── blog/
│ ├── page.tsx # Blog listing
│ ├── [slug]/page.tsx # Individual post
│ └── tag/[tag]/page.tsx # Tag filter
├── archives/page.tsx # Archives
└── api/search/route.ts # Search API
- Static Site Generation (SSG): All pages pre-rendered at build time
- MDX Content: Posts stored as MDX files with frontmatter
- Image Handling: Next.js Image component with optimization
- Dark Mode: CSS variables with next-themes
- Performance: Route prefetching, lazy loading, code splitting
sonicdmg.github.io/
├── .github/workflows/deploy.yml
├── app/
│ ├── layout.tsx
│ ├── page.tsx
│ ├── globals.css
│ ├── about/page.tsx
│ ├── blog/
│ │ ├── page.tsx
│ │ ├── [slug]/page.tsx
│ │ └── tag/[tag]/page.tsx
│ ├── archives/page.tsx
│ └── api/search/route.ts
├── components/
│ ├── layout/
│ │ ├── Header.tsx
│ │ ├── Footer.tsx
│ │ └── Sidebar.tsx
│ ├── blog/
│ │ ├── PostCard.tsx
│ │ ├── PostList.tsx
│ │ └── TagList.tsx
│ ├── mdx/
│ │ ├── Callout.tsx
│ │ ├── CodeBlock.tsx
│ │ └── MDXComponents.tsx
│ ├── search/
│ │ └── SearchBar.tsx
│ └── ui/
│ ├── Button.tsx
│ └── ThemeToggle.tsx
├── content/
│ └── posts/
│ ├── 2017-02-07-im-sure-you-werent-looking.mdx
│ ├── 2017-02-07-mixed-workload-dse-cluster.mdx
│ ├── 2017-02-13-dropping-in-on-my-cluster.mdx
│ ├── 2017-04-17-dont-block-async-calls.mdx
│ ├── 2018-01-09-its-been-a-while.mdx
│ ├── 2018-01-10-cassandra-to-search-part-1.mdx
│ ├── 2018-01-24-cassandra-to-search-part-2.mdx
│ └── 2018-02-12-cassandra-to-search-part-2-updated.mdx
├── lib/
│ ├── mdx.ts
│ ├── posts.ts
│ ├── search.ts
│ └── utils.ts
├── public/
│ ├── images/
│ │ ├── banner.jpg
│ │ └── posts/
│ └── fonts/
├── types/
│ └── post.ts
├── scripts/
│ ├── generate-sitemap.ts
│ ├── generate-rss.ts
│ └── migrate-legacy-content.ts
├── next.config.ts
├── tailwind.config.ts
├── tsconfig.json
└── package.json
Tasks:
- Initialize Next.js 16 project with TypeScript and Tailwind
- Install all required dependencies
- Configure Git repository
- Setup ESLint, Prettier, and Husky
Commands:
npx create-next-app@latest sonicdmg-blog --typescript --tailwind --app
cd sonicdmg-blog
npm install @next/mdx @mdx-js/loader @mdx-js/react gray-matter
npm install remark-gfm rehype-slug rehype-autolink-headings rehype-pretty-code shiki
npm install flexsearch date-fns clsx tailwind-merge
npm install next-sitemap feed
npm install -D @types/node prettier eslint-config-prettierDeliverables:
- ✅ Initialized Next.js project
- ✅ Dependencies installed
- ✅ Development tools configured
Tasks:
- Create directory structure
- Setup TypeScript types
- Create utility functions
- Configure constants
Key Files:
types/post.ts- Post type definitionslib/mdx.ts- MDX processing utilitieslib/posts.ts- Post fetching functionslib/utils.ts- Helper functions
Deliverables:
- ✅ Complete directory structure
- ✅ Type definitions
- ✅ Core utilities
Tasks:
- Configure MDX in next.config.ts
- Create MDX processing utilities
- Implement post parsing
- Create custom MDX components
Key Components:
- Callout (info, warning, error, success)
- CodeBlock (syntax highlighting, copy button)
- ImageGallery (responsive grid, lightbox)
- YouTubeEmbed (responsive, lazy loading)
Deliverables:
- ✅ MDX configuration complete
- ✅ Post parsing working
- ✅ Custom components created
Tasks:
- Configure Tailwind CSS with custom theme
- Create layout components (Header, Footer, Sidebar)
- Create blog components (PostCard, PostList, etc.)
- Implement dark mode
- Make responsive design
Key Features:
- Responsive navigation with mobile menu
- Dark mode toggle with persistence
- Tag cloud and category widgets
- Recent posts sidebar
- Social media links
Deliverables:
- ✅ Tailwind configured
- ✅ All layout components
- ✅ Blog components
- ✅ Dark mode working
Tasks:
- Implement all blog pages
- Add search functionality
- Calculate reading time
- Implement related posts
- Add social sharing
Pages:
- Home (featured + recent posts)
- Blog listing (with pagination)
- Individual post (with TOC, comments)
- Tag pages (filtered posts)
- Archives (by date)
- About page
Deliverables:
- ✅ All pages implemented
- ✅ Search working
- ✅ Related posts algorithm
- ✅ Social sharing
Tasks:
- Create migration script (HTML → MDX)
- Migrate all 8 blog posts
- Copy and organize images
- Setup URL redirects
- Verify content accuracy
Migration Script:
- Extract metadata from HTML
- Convert HTML to Markdown
- Create MDX files with frontmatter
- Copy associated images
- Generate redirect mappings
Deliverables:
- ✅ Migration script
- ✅ All posts migrated
- ✅ Images organized
- ✅ Redirects configured
Tasks:
- Implement metadata for all pages
- Generate sitemap
- Create RSS/Atom feeds
- Optimize images
- Add analytics
SEO Checklist:
- ✅ Meta tags (title, description, keywords)
- ✅ Open Graph tags
- ✅ Twitter Card tags
- ✅ Structured data (JSON-LD)
- ✅ Sitemap.xml
- ✅ RSS feed
- ✅ Robots.txt
Performance Targets:
- First Contentful Paint < 1.8s
- Largest Contentful Paint < 2.5s
- Cumulative Layout Shift < 0.1
- Time to Interactive < 3.8s
Deliverables:
- ✅ Complete metadata
- ✅ Sitemap generated
- ✅ RSS feeds
- ✅ Performance optimized
Tasks:
- Configure Next.js for static export
- Create GitHub Actions workflow
- Setup repository settings
- Test deployment
- Configure custom domain (if needed)
GitHub Actions Workflow:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- Checkout code
- Setup Node.js
- Install dependencies
- Build Next.js
- Generate sitemap & RSS
- Deploy to GitHub PagesDeliverables:
- ✅ Static export configured
- ✅ GitHub Actions workflow
- ✅ Automated deployment
Testing Areas:
- Unit tests (utilities, components)
- Integration tests (pages, navigation)
- Accessibility audit (WCAG AA)
- Performance testing (Lighthouse)
- Cross-browser testing
- Responsive design testing
- Content verification
Tools:
- Jest + React Testing Library
- Lighthouse
- axe DevTools
- WebPageTest
Deliverables:
- ✅ Test suite
- ✅ Accessibility passed
- ✅ Performance benchmarks met
- ✅ Cross-browser verified
Tasks:
- Write comprehensive README
- Document component usage
- Create deployment guide
- Write content authoring guide
- Final review and launch
Documentation:
- README.md (project overview, setup)
- CONTRIBUTING.md (how to contribute)
- CONTENT_GUIDE.md (writing posts)
- DEPLOYMENT.md (deployment process)
Deliverables:
- ✅ Complete documentation
- ✅ Launch checklist completed
- ✅ Site live on GitHub Pages
import createMDX from '@next/mdx'
import rehypeSlug from 'rehype-slug'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypePrettyCode from 'rehype-pretty-code'
import remarkGfm from 'remark-gfm'
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: 'wrap' }],
[rehypePrettyCode, { theme: 'github-dark' }],
],
},
})
const nextConfig = {
output: 'export',
images: { unoptimized: true },
basePath: '',
trailingSlash: true,
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
}
export default withMDX(nextConfig)import type { Config } from 'tailwindcss'
const config: Config = {
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
],
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
500: '#0ea5e9',
600: '#0284c7',
},
},
},
},
plugins: [require('@tailwindcss/typography')],
}
export default config{
"compilerOptions": {
"target": "ES2020",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}- Install dependencies:
npm ci - Build Next.js:
npm run build - Generate sitemap:
npm run postbuild - Generate RSS:
npm run generate-rss - Output to
/outdirectory
- Triggered on push to main branch
- Runs build process
- Deploys to GitHub Pages
- Adds .nojekyll file
- Configures custom domain (if applicable)
- Verify all pages load
- Test search functionality
- Check image loading
- Verify redirects work
- Test on mobile devices
- Monitor analytics
Step 1: Extract Metadata
- Title from
.article-title - Date from
.article-date time[datetime] - Category from
.article-category-link - Tags from
.article-tag-list-link
Step 2: Convert Content
- Use Turndown.js for HTML → Markdown
- Preserve code blocks
- Convert images to Next.js Image syntax
- Update internal links
Step 3: Create MDX Files
---
title: "Post Title"
date: "2017-02-07"
excerpt: "Brief description..."
category: "Technical"
tags: ["datastax", "cassandra"]
---
Post content here...Step 4: Migrate Images
- Copy from legacy structure
- Organize by year/month/slug
- Optimize and compress
- Update references in MDX
Step 5: Setup Redirects
- Map old URLs to new URLs
- Configure in next.config.ts
- Test all redirects
OLD: /2017/02/07/Post-Title/
NEW: /blog/2017-02-07-post-title
- Semantic HTML5 structure
- Proper heading hierarchy (H1 → H6)
- Meta descriptions (150-160 chars)
- Alt text for all images
- Internal linking
- Fast page load times
- XML sitemap
- Robots.txt
- Structured data (JSON-LD)
- Canonical URLs
- Mobile-friendly design
- HTTPS enabled
- Keyword-rich titles
- Descriptive URLs
- Quality content
- Regular updates
- Social sharing
- Next.js Image component
- WebP format
- Lazy loading
- Responsive sizes
- Blur placeholder
- Tree shaking
- Code splitting
- Dynamic imports
- Minification
- Compression (gzip/brotli)
- Static generation
- Immutable assets
- Long cache headers
- CDN delivery
- Utility functions
- Component rendering
- Props validation
- Edge cases
- Page navigation
- Search functionality
- Form submissions
- API routes
- User workflows
- Critical paths
- Cross-browser
- Mobile devices
- Keyboard navigation
- Screen readers
- Color contrast
- ARIA labels
- All content migrated
- Images optimized
- SEO metadata complete
- Analytics configured
- Performance tested
- Accessibility audited
- Cross-browser tested
- Mobile responsive
- Search working
- Dark mode working
- Deploy to GitHub Pages
- Verify deployment
- Test all pages
- Check redirects
- Monitor errors
- Submit sitemap to Google
- Monitor analytics
- Check performance
- Gather feedback
- Fix issues
- Plan improvements
- Update dependencies monthly
- Review analytics weekly
- Check broken links monthly
- Optimize images as needed
- Update content regularly
- Performance metrics
- Error tracking
- User feedback
- Search queries
- Popular content
- Lighthouse score > 90
- Page load < 2s
- Core Web Vitals passed
- Indexed pages
- Search rankings
- Organic traffic
- Backlinks
- Page views
- Time on site
- Bounce rate
- Return visitors
This implementation plan provides a comprehensive roadmap for migrating the Aerial Dev blog from static HTML to a modern Next.js 16 application. The phased approach ensures systematic progress while maintaining quality and performance standards.
Estimated Timeline: 15 days Team Size: 1-2 developers Complexity: Medium
Key Success Factors:
- Thorough planning and preparation
- Incremental implementation
- Comprehensive testing
- Performance optimization
- SEO best practices
- Quality documentation
Next Steps:
- Review and approve this plan
- Setup development environment
- Begin Phase 1 implementation
- Regular progress reviews
- Iterative improvements
Document Version: 1.0
Last Updated: 2026-02-26
Author: Technical Planning Team