How mikemurphyco/mikemurphy-ai works
Purpose and Runtime
mikemurphy.ai is a content-driven personal publishing site replacing selected WordPress functionality while the legacy mikemurphy.co remains live for URL transition. Astro v6 statically builds the site; Cloudflare Pages/Workers hosts the generated output. Primary runtime configuration is in astro.config.mjs and wrangler.toml.
Entry Points and Route Surface
Astro file routes define the public site: homepage, informational pages, and content indexes at src/pages/index.astro, src/pages/articles/index.astro, and src/pages/ai-unplugged/index.astro. Dynamic routes render individual article/podcast/tutorial/topic/issue pages, notably src/pages/articles/[slug].astro, src/pages/ai-unplugged/issues/[slug].astro, and src/pages/tutorials/[slug].astro.
Content Collections
The repository’s core data is versioned Markdown/MDX content. The main archive is organized by publication year in src/content/articles/; the AI Unplugged newsletter is a separate collection in src/content/ai-unplugged/. src/content.config.ts is the schema/collection boundary that routes and libraries consume, separating authored content from rendering logic.
Content Rendering Pipeline
At build time, routes query and transform collection entries through shared domain logic in src/lib/articles.ts and src/lib/site.ts, then render them with Astro pages and reusable cards. Shared page shell and navigation flow through src/layouts/Layout.astro and src/components/SiteHeader.astro; collection-specific listing presentation is encapsulated by src/components/ArticleCard.astro and src/components/ai-unplugged/IssueCard.astro.
Discovery and Machine-Readable Outputs
The site exposes indexable and AI-consumable endpoints alongside HTML: sitemap, robots, LLM metadata, and newsletter feeds are implemented in src/pages/sitemap.xml.ts, src/pages/robots.txt.ts, src/pages/llms.txt.ts, src/pages/ai-unplugged/rss.xml.ts, and src/pages/ai-unplugged/agent.json.ts. Shared RSS/agent generation belongs in src/lib/rss.ts and src/lib/agent.ts.
Static Assets and Client Behavior
Media is served directly from public/assets/media/, preserving date-based asset paths used by Markdown. Brand assets live under public/assets/brand/. Styling is centralized in src/styles/global.css; interactive search is isolated to src/components/InlineSearch.astro, rather than requiring an application backend.
Migration, Redirects, and Delivery
Redirect compatibility is a first-class deployment boundary: static redirects are in public/_redirects; generated redirect artifacts are produced by scripts/generate-redirects.mjs, scripts/generate-main-site-redirects.mjs, and scripts/generate-pretty-link-redirects.mjs, with Cloudflare bulk mappings in cloudflare/pretty-links-bulk-redirects.csv. Pushes to main trigger Cloudflare builds/deployment; scripts/qa-launch.mjs validates launch, content, and redirect integrity before changes ship.
Main entry points: index.astro Public pages · wrangler.toml Cloudflare Pages/Workers · articles.ts Content domain logic · [slug].astro Content detail pages
Components 18
Authored content
Versioned publication collections and schemas.
- Article archive · Year-organized main publication archive.
src/content/articles - AI Unplugged · Newsletter content collection.
src/content/ai-unplugged - Collection schemas · Schema boundary consumed by routes and libraries.
src/content.config.ts
Site rendering
Astro routes, shared domain logic, and UI.
- Content domain logic · Queries and transforms collection entries at build time.
src/lib/articles.ts - Site utilities
src/lib/site.ts - Public pages · Home, indexes, and informational page surface.
src/pages/index.astro - Content detail pages · Renders article, issue, tutorial, and topic detail pages.
src/pages/articles/[slug].astro - Page shell · Shared layout and navigation frame.
src/layouts/Layout.astro - Site header
src/components/SiteHeader.astro - Collection cards · Article and issue listing presentation.
src/components/ArticleCard.astro - Inline search · Isolated client-side search behavior.
src/components/InlineSearch.astro - Assets and global styles · Preserved Markdown media paths, brand assets, and shared styling.
public/assets/media
Discovery outputs
Machine-readable static endpoints.
- Discovery endpoints · Sitemap, robots, LLM metadata, RSS, and agent outputs.
src/pages/sitemap.xml.ts - Feed and agent generation · Builds newsletter RSS and agent metadata.
src/lib/rss.ts
Migration and delivery
Redirect compatibility, validation, and Cloudflare deployment.
- Redirect sources · Legacy URL compatibility rules and generators.
public/_redirects - Pretty-link mappings
cloudflare/pretty-links-bulk-redirects.csv - Launch QA · Validates launch, content, and redirect integrity.
scripts/qa-launch.mjs - Cloudflare Pages/Workers · Builds and serves static Astro output on pushes to main.
wrangler.toml
Connections 25
- Article archive → Collection schemas: validated by
- AI Unplugged → Collection schemas: validated by
- Collection schemas → Content domain logic: defines collections for
- Article archive → Content domain logic: queried by
- AI Unplugged → Content domain logic: queried by
- Content domain logic → Public pages: supplies indexes
- Content domain logic → Content detail pages: supplies entries
- Site utilities → Public pages: supports
- Site utilities → Content detail pages: supports
- Public pages → Page shell: uses
- Content detail pages → Page shell: uses
- Page shell → Site header: includes
- Public pages → Collection cards: renders listings with
- Public pages → Inline search: embeds
- Page shell → Assets and global styles: loads
- Article archive → Feed and agent generation: provides feed content
- AI Unplugged → Feed and agent generation: provides feed content
- Feed and agent generation → Discovery endpoints: generates
- Public pages → Cloudflare Pages/Workers: static build deployed to
- Content detail pages → Cloudflare Pages/Workers: static build deployed to
- Discovery endpoints → Cloudflare Pages/Workers: published by
- Redirect sources → Cloudflare Pages/Workers: applied at deployment
- Pretty-link mappings → Cloudflare Pages/Workers: configures bulk redirects
- Launch QA → Redirect sources: validates
- Launch QA → Cloudflare Pages/Workers: gates release