RJ Leyva's personal blog, documenting web development insights through writing.
- React 19.2.0 with React Compiler (babel-plugin-react-compiler)
- TypeScript 5.9.3 with strict type checking
- Vite 7.2.5 (Rolldown) for fast development and optimized builds
- React Router v7 (data-mode) for client-side routing
- Context API for theme management with localStorage persistence
- Unified ecosystem for markdown processing:
remark-parse+remark-gfmfor GitHub Flavored Markdownremark-rehypefor HTML conversionrehype-reactfor React component renderingrehype-slugfor heading anchorsrehype-sanitizefor content security
- CSS Modules with BEM methodology for scoped styling
- CSS custom properties for dynamic theming (dark/light modes)
- Modern Normalize for consistent cross-browser styling
- Responsive design with mobile-first approach
- ESLint 9 with React-specific rules and accessibility plugins
- Prettier 3.7.3 with import sorting (ianvs/prettier-plugin-sort-imports)
- tsx for TypeScript execution in build scripts
- Bundle analyzer for build optimization insights
- Cloudflare Pages for global CDN deployment
- Wrangler for Cloudflare integration
- Automated content generation and RSS feed creation
- Optimized chunk splitting for vendor libraries
- Dark/Light theme toggle with system preference detection
- Automatic favicon switching based on theme
- Smooth theme transitions with CSS custom properties
- Persistent theme selection in localStorage
- Markdown-based blog posts with YAML frontmatter
- Topic-based content organization (
/blog/:topic/:slug) - Automatic reading time estimation (200 WPM)
- Frontmatter validation with helpful error messages
- Build-time content import generation
- React Compiler for optimized re-renders
- Lazy loading for blog pages and components
- Code splitting for vendor libraries (React, markdown processing)
- Bundle analysis and optimization
- Hot module replacement during development
- Strict TypeScript configuration
- Comprehensive ESLint rules with React and accessibility plugins
- Prettier with automatic import sorting
- Error boundaries for graceful error handling
- Build-time content validation and generation
- Responsive design for all screen sizes
- Copy-to-clipboard functionality for code blocks
- SEO-friendly URLs and meta tags
- Accessible navigation and keyboard support
- Loading states and error handling
- Automated RSS feed generation (XML + HTML preview)
- Social media links (GitHub, LinkedIn, Instagram)
- Structured data for better SEO
- Sitemap and robots.txt generation
src/
├── components/ # Reusable UI components
│ ├── ui/ # Core UI components (Header, BlogCard, etc.)
│ ├── icons/ # SVG icon components
│ └── RouteErrorBoundary/
├── content/ # Blog content in Markdown
│ └── blog/ # Topic-organized blog posts
├── contexts/ # React context providers
├── hooks/ # Custom React hooks
├── layouts/ # Page layout components
├── lib/ # Business logic and utilities
│ ├── content/ # Content processing and validation
│ └── blogContentApi.ts
├── pages/ # Route-specific page components
├── routes/ # React Router configuration
├── services/ # External service integrations
├── styles/ # Global styles and theme variables
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
Blog posts are written in Markdown with YAML frontmatter:
---
title: 'My Blog Post'
date: '2025-12-05'
description: 'A brief description of the post content'
tags: ['javascript', 'react', 'tutorial']
---
# Post Content
Your markdown content here...title(required): Post titledate(required): Publication date (ISO format)description(required): SEO description and RSS summarytags(optional): Array of topic tags
Posts are organized by topic in src/content/blog/:
src/content/blog/
├── css/
│ └── styling-techniques.md
├── javascript/
│ └── modern-patterns.md
└── react/
└── component-design.md
URLs follow the pattern: /blog/{topic}/{slug}
- Node.js 18+
- pnpm
pnpm installpnpm devStarts the development server at http://localhost:3000
# Development build
pnpm build
# Production build with linting and type checking
pnpm build:production
# Preview production build
pnpm previewThe build process automatically generates:
- TypeScript imports for all blog content
- RSS feed (XML and HTML preview)
- Reading time calculations
- Content validation
# Lint code
pnpm lint
# Fix linting issues
pnpm lint:fix
# Format code
pnpm format
# Type check
pnpm type-checkDeployed on Cloudflare Pages with:
- Global CDN distribution
- Automatic HTTPS
- Build optimization for performance
- Custom headers and redirects
MIT License.
Content Notice: The blog posts in
src/content/blog/are original content. Please do not copy or reuse them without proper attribution and permission.


