How shetharp/arpitsheth works
Project Type and Purpose
• This is a static personal website and portfolio built with Gatsby (a React-based static site generator).
• Content is authored in MDX under content/ and drafts/. A custom theme plugin (gatsby-theme-polaroid) provides styling, components, and data.
File Structure
• Top level:
• gatsby-config.js, package.json, tsconfig.json → project configuration and dependencies
• content/ & drafts/ → MDX pages and posts
• src/@shetharp/gatsby-theme-polaroid/ → local theme plugin (assets, components, data)
• src/components/ → custom React components
• src/gatsby-plugin-theme-ui/ → Theme UI plugin overrides
• static/ → static assets (e.g., CNAME)
• public/ → generated site
Readme Insights
• Gatsby CLI is used for “develop”, “build”, “serve”, and “deploy” (to GitHub Pages).
• No automated CI/CD; manual yarn deploy pushes public to the gh-pages branch.
• Customizable via MDX and theme shadowing.
Main Components
a. Developer Workstation
• Node.js & Yarn → runs Gatsby CLI
b. Content Sources
• content/ (pages, posts) and drafts/
• MDX files and images
c. Theme Plugin & Custom Code
• gatsby-theme-polaroid (assets, components, data)
• Custom components in src/components
• Theme-UI plugin overrides
d. Gatsby Build Pipeline
• Source plugins read files
• MDX transformer
• GraphQL data layer
• React renderer → static HTML/CSS/JS
e. Build Artifacts
• public/ directory (static site)
f. Deployment Target
• GitHub Pages (serving gh-pages branch)
• DNS via CNAME pointing arpitsheth.com to GitHub
Relationships and Data Flow
1. Developer invokes gatsby develop or gatsby build
2. Gatsby sources MDX & assets → transforms via plugins → builds a GraphQL schema
3. React components (from the theme plugin and custom code) query data and render pages
4. Gatsby outputs static site in public/
5. yarn deploy pushes public/ to gh-pages branch
6. GitHub Pages serves the static files; DNS CNAME directs domain
7. Client browser requests pages over HTTPS
Architectural Patterns and Principles
• Static Site Generation (SSG)
• Plugin-based extensibility (Gatsby themes & plugins)
• Component shadowing for easy customization
• MDX for combined markdown + React
Essential Details to Capture
• The transformation steps in Gatsby (MDX → GraphQL → React → HTML)
• The manual deploy step to GitHub Pages and DNS configuration via CNAME
• How local development (gatsby develop) vs. production build (gatsby build + gatsby serve) fit into the workflow