How yeo11200/gatsby-blog works
Project type and purpose
• This is a Gatsby‐based static site generator project used for a personal blog and résumé.
• It leverages React (with TypeScript and SCSS) to produce a static site from Markdown content and deploys to Vercel.
File structure
• Top level
– content/ : Markdown files (resume, about pages, other blog content)
– gatsby-config.js, gatsby-node.js, gatsby-meta-config.js : Gatsby configuration and customization
– src/ : React components, pages, templates, and type definitions
– vercel.json : deployment settings
• src/components/ : reusable UI pieces (Layout, Modal, presidential‐detail modal, etc.)
• src/pages/ : Gatsby “page” components (index.tsx, /projects)
• src/templates/ : GraphQL‐driven page templates (e.g. AboutTemplate.tsx)
• SCSS files alongside TSX to style components
• tsconfig.json : TypeScript compiler settings
Key insights from README
• Purpose is simple: “Use gatsby to organize blog and résumé”
a. Main components
1. Content Layer
– Markdown sources in content/
2. Build Layer (Gatsby Node.js)
– Plugins & GraphQL data layer
– gatsby-config.js / gatsby-node.js customize sourcing and page creation
3. Frontend Layer
– React + TypeScript components (src/)
– SCSS styling
4. Deployment & Hosting
– Vercel CI/CD picks up Git, runs gatsby build, and serves static assets via CDN
b. Relationships & data flow
– Data flows into GraphQL layer → injected into page templates → React components render static HTML/CSS/JS
– Build output (public/) → Vercel deployment → end‐user browser
c. Architectural patterns & design principles
– Static Site Generation (SSG)
– Component reuse (Layout wrapper, Modal abstractions)
– Type safety (TypeScript + .d.ts for images)
– Styles co-located with components (SCSS modules)
d. Technologies & frameworks
– Node.js/Gatsby
– React + TypeScript
– SCSS for styling
– Vercel for hosting