How jpasholk/jpshlk-blog works
Project type and purpose
• This is a static site blog built with Astro (a static-site generator) using MDX content, Tailwind CSS, and client-islands/components.
• The README confirms it’s a personal blog deployed via Netlify, with content in src/content and UI in src/components and src/layouts.
File structure for architectural clues
• Top-level files:
• astro.config.mjs, package.json, tailwind.config.cjs, tsconfig.json – config for build toolchain.
• public/ – truly static assets (favicons, audio, JSON).
• Source tree (src/):
• content/ holds Markdown/MDX for authors, blog posts, tags.
• components/ contains reusable Astro “islands” (UI pieces).
• layouts/ defines page templates (root, list, post, author).
• pages/ defines routes (index, blog paging, tag pages, RSS feed generator).
• styles/global.css – global Tailwind styles.
• functions.ts and src/env.d.ts – any build-time helpers or typed environment.
• No traditional backend or database—data comes at build time from local files.
README for extra context
• Confirms Astro is the framework.
• Mentions deployment on Netlify (CI/CD pipeline).
• Credits an external JSON of quotes (fetched from public/quotes.json).
a. Main components:
1. Content Sources:
– MDX files under src/content/
– Static JSON (public/quotes.json), images, audio.
2. Build System:
– Astro compiler + Node.js
– Tailwind CSS processor
– TypeScript transpilation
– RSS feed generator (src/pages/rss.xml.js)
3. Output Artifacts:
– Static HTML, CSS, JS (in dist/)
4. Deployment Pipeline:
– GitHub repo → push triggers Netlify build → static site hosted on CDN
5. Client:
– Browser renders static pages, loads any Astro “islands”/hydrated components, applies theme switcher, dynamic quotes, etc.
b. Interactions/data flow:
– Developer commits to GitHub → Netlify CI picks up commit → runs npm run build using Astro/Tailwind → outputs /dist → Netlify publishes to CDN → end-user HTTP(S) request → CDN delivers static assets → browser renders.
– During build: Astro reads MDX + JSON → generates HTML pages and feeds → bundles CSS/JS.
c. Architectural patterns/design principles:
– Static-Site Generation (SSG)
– Component-based UI (Astro Islands)
– Content-driven routing (filesystem-based routing)
– CI/CD pipeline for automated deployment
d. Key technologies/frameworks:
– Astro
– Tailwind CSS
– MDX (Markdown + JSX)
– Netlify (CI/CD + CDN)
– TypeScript