A personal blog by Martin Garcia. Thoughts, words, and experiments about code.
- Framework: React Router v7
- Deployment: Cloudflare Pages
- Content: Markdown with gray-matter
- Styling: Tailwind CSS
- UI Components: Radix UI
- Syntax Highlighting: Prism React Renderer
- Testing: Vitest + Playwright
- Package Manager: Yarn 4.1.1
- Static site generation with React Router's prerender feature
- Multi-language support (English, Spanish, Catalan)
- Dark/light theme with system preference detection
- RSS feed and sitemap generation
- Tag-based content filtering
- Reading time estimation
- SEO optimization
- Accessibility testing with axe-core
.
├── app/ # Application code and routes
│ ├── routes/ # React Router v7 routes
│ ├── root.tsx # Root layout component
│ └── entry.*.tsx # Client and server entry points
├── components/ # Reusable React components
├── data/
│ └── blog/ # Blog posts in Markdown format
├── hooks/ # Custom React hooks
├── lib/ # Utilities and helper functions
├── public/ # Static assets (fonts, images, robots.txt)
├── scripts/ # Build scripts (RSS, sitemap generation)
├── styles/ # Global styles and theme CSS
└── tests/ # Unit and E2E tests
git clone https://github.com/magarcia/magarcia.io.git
cd magarcia.io
yarn install
yarn devThe site will be available at http://localhost:5173
yarn dev- Start development serveryarn build- Build static site and generate sitemap/RSSyarn serve- Preview production build locallyyarn lint- Run ESLintyarn typecheck- Run TypeScript type checkingyarn test:unit- Run unit testsyarn test:e2e- Run end-to-end testsyarn build:ci- Full CI build with tests
Blog posts are stored as Markdown files in data/blog/ with frontmatter for
metadata:
slug- URL path for the posttitle- Post titledate- Publication datetags- Array of tagsdraft- Boolean for draft statussummary- Short description
Multi-language variants use file extensions: .mdx (English), .es.mdx
(Spanish), .ca.mdx (Catalan).
The site is deployed to Cloudflare Pages via GitHub integration. The build command runs:
- React Router build (static prerendering)
- Sitemap generation
- RSS feed generation
- Static asset copying
The _headers and _redirects files configure redirects and security headers
for Cloudflare Pages.