# calevin/blog architecture

> Architecture diagram of the GitHub repository calevin/blog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/calevin/blog
- Repository: https://github.com/calevin/blog

## Overview

This repository is a personal Astro blog. Readers browse posts by section and open individual articles; the content collection defines post metadata and section names, while MDX components provide styled article elements. The README also identifies Shiki syntax highlighting and a Neo-Brutalist visual design. Page and layout source was not sampled, so their exact calls and rendering relationships are not verified; dashed links indicate those workflow connections are inferred rather than evidenced.

Main entry points: [`src/pages`](https://github.com/calevin/blog/tree/main/src/pages) (Page Routes), [`src/content/blog`](https://github.com/calevin/blog/tree/main/src/content/blog) (Blog Posts), [`src/layouts/Layout.astro`](https://github.com/calevin/blog/blob/main/src/layouts/Layout.astro) (Site Layout), [`src/pages/blog/[slug].astro`](https://github.com/calevin/blog/blob/main/src/pages/blog/%5Bslug%5D.astro) (Article Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Blog Content"]
  node_collection["Blog Collection<br/>[content.config.ts]"]
  node_posts["Blog Posts"]
end

subgraph group_site["Reader Experience"]
  node_routes["Page Routes"]
  node_home["Blog Home<br/>[index.astro]"]
  node_section["Section Listing<br/>[index.astro]"]
  node_article["Article Page<br/>[&#91;slug&#93;.astro]"]
  node_notfound["Not Found<br/>[404.astro]"]
  node_layout["Site Layout<br/>[Layout.astro]"]
  node_sidebar["Sidebar<br/>[Sidebar.astro]"]
  node_date["Date Formatter"]
end

subgraph group_presentation["Article Presentation"]
  node_mdxmap["MDX Component Map<br/>[index.ts]"]
  node_mdxparts["MDX Elements"]
  node_highlight["Shiki Highlighting<br/>[astro.config.mjs]"]
  node_styles["Global Styles<br/>[global.css]"]
end

node_reader(("Reader"))

node_reader -.->|"browses"| node_routes
node_routes -.->|"routes to"| node_home
node_routes -.->|"routes to"| node_section
node_routes -.->|"routes to"| node_article
node_routes -.->|"routes to"| node_notfound
node_collection -->|"loads entries"| node_posts
node_article -.->|"renders post"| node_posts
node_section -.->|"lists section"| node_posts
node_home -.->|"uses layout"| node_layout
node_section -.->|"uses layout"| node_layout
node_article -.->|"uses layout"| node_layout
node_layout -.->|"renders"| node_sidebar
node_article -.->|"formats date"| node_date
node_mdxmap -->|"maps elements"| node_mdxparts
node_posts -.->|"renders MDX"| node_mdxmap
node_posts -.->|"highlights code"| node_highlight
node_layout -.->|"uses styles"| node_styles

click node_routes "https://github.com/calevin/blog/tree/main/src/pages"
click node_home "https://github.com/calevin/blog/blob/main/src/pages/index.astro"
click node_section "https://github.com/calevin/blog/blob/main/src/pages/%5Bsection%5D/index.astro"
click node_article "https://github.com/calevin/blog/blob/main/src/pages/blog/%5Bslug%5D.astro"
click node_notfound "https://github.com/calevin/blog/blob/main/src/pages/404.astro"
click node_layout "https://github.com/calevin/blog/blob/main/src/layouts/Layout.astro"
click node_sidebar "https://github.com/calevin/blog/blob/main/src/components/Sidebar.astro"
click node_date "https://github.com/calevin/blog/blob/main/src/components/FormattedDate.astro"
click node_collection "https://github.com/calevin/blog/blob/main/src/content.config.ts"
click node_posts "https://github.com/calevin/blog/tree/main/src/content/blog"
click node_mdxmap "https://github.com/calevin/blog/blob/main/src/components/mdx/index.ts"
click node_mdxparts "https://github.com/calevin/blog/tree/main/src/components/mdx"
click node_highlight "https://github.com/calevin/blog/blob/main/astro.config.mjs"
click node_styles "https://github.com/calevin/blog/blob/main/src/styles/global.css"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_collection,node_posts toneBlue
class node_routes,node_home,node_section,node_article,node_notfound,node_layout,node_sidebar,node_date toneAmber
class node_mdxmap,node_mdxparts,node_highlight,node_styles toneMint
class node_reader toneIndigo
```

## Components

### Blog Content

- [Blog Collection](https://github.com/calevin/blog/blob/main/src/content.config.ts): `src/content.config.ts`
- [Blog Posts](https://github.com/calevin/blog/tree/main/src/content/blog): `src/content/blog`

### Reader Experience

- [Page Routes](https://github.com/calevin/blog/tree/main/src/pages): `src/pages`
- [Blog Home](https://github.com/calevin/blog/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Section Listing](https://github.com/calevin/blog/blob/main/src/pages/%5Bsection%5D/index.astro): `src/pages/[section]/index.astro`
- [Article Page](https://github.com/calevin/blog/blob/main/src/pages/blog/%5Bslug%5D.astro): `src/pages/blog/[slug].astro`
- [Not Found](https://github.com/calevin/blog/blob/main/src/pages/404.astro): `src/pages/404.astro`
- [Site Layout](https://github.com/calevin/blog/blob/main/src/layouts/Layout.astro): `src/layouts/Layout.astro`
- [Sidebar](https://github.com/calevin/blog/blob/main/src/components/Sidebar.astro): `src/components/Sidebar.astro`
- [Date Formatter](https://github.com/calevin/blog/blob/main/src/components/FormattedDate.astro): `src/components/FormattedDate.astro`

### Article Presentation

- [MDX Component Map](https://github.com/calevin/blog/blob/main/src/components/mdx/index.ts): `src/components/mdx/index.ts`
- [MDX Elements](https://github.com/calevin/blog/tree/main/src/components/mdx): `src/components/mdx`
- [Shiki Highlighting](https://github.com/calevin/blog/blob/main/astro.config.mjs): `astro.config.mjs`
- [Global Styles](https://github.com/calevin/blog/blob/main/src/styles/global.css): `src/styles/global.css`

### Other components

- **Reader**

## Connections

- Reader → Page Routes: browses
- Page Routes → Blog Home: routes to
- Page Routes → Section Listing: routes to
- Page Routes → Article Page: routes to
- Page Routes → Not Found: routes to
- Blog Collection → Blog Posts: loads entries (evidence: `src/content.config.ts`)
- Article Page → Blog Posts: renders post
- Section Listing → Blog Posts: lists section
- Blog Home → Site Layout: uses layout
- Section Listing → Site Layout: uses layout
- Article Page → Site Layout: uses layout
- Site Layout → Sidebar: renders
- Article Page → Date Formatter: formats date
- MDX Component Map → MDX Elements: maps elements (evidence: `src/components/mdx/index.ts`)
- Blog Posts → MDX Component Map: renders MDX
- Blog Posts → Shiki Highlighting: highlights code (evidence: `README.md`)
- Site Layout → Global Styles: uses styles
