# 0329zdn/astro-blog architecture

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

- Interactive diagram: https://gitdiagram.com/0329zdn/astro-blog
- Repository: https://github.com/0329zdn/astro-blog

## Overview

This is a minimal Astro blog/site: visitors reach file-based pages, while Markdown files are configured as a validated blog content collection. The README documents Astro’s page-to-route behavior, and the sampled content configuration shows the collection’s Markdown loader and schema. Page rendering relationships to layouts and components are not shown in the sampled source, so those links are omitted.

Main entry points: [`src/content.config.ts`](https://github.com/0329zdn/astro-blog/blob/main/src/content.config.ts) (Blog collection), [`src/pages/index.astro`](https://github.com/0329zdn/astro-blog/blob/main/src/pages/index.astro) (Home page), [`src/pages/catalog.astro`](https://github.com/0329zdn/astro-blog/blob/main/src/pages/catalog.astro) (Catalog page), [`src/pages/blog/[id].astro`](https://github.com/0329zdn/astro-blog/blob/main/src/pages/blog/%5Bid%5D.astro) (Blog detail page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["Site routes"]
  node_home["Home page<br/>[index.astro]"]
  node_catalog["Catalog page<br/>[catalog.astro]"]
  node_blog_detail["Blog detail page<br/>[&#91;id&#93;.astro]"]
end

subgraph group_content["Blog content"]
  node_blog_collection["Blog collection<br/>[content.config.ts]"]
  node_blog_posts["Markdown posts"]
end

subgraph group_presentation["Presentation"]
  node_base_layout["Base layout<br/>[BaseLayout.astro]"]
  node_header["Header<br/>[Header.astro]"]
  node_footer["Footer<br/>[Footer.astro]"]
  node_global_styles["Global styles<br/>[global.css]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests route"| node_home
node_visitor -->|"requests route"| node_catalog
node_visitor -->|"requests route"| node_blog_detail
node_blog_collection -->|"loads and validates"| node_blog_posts

click node_home "https://github.com/0329zdn/astro-blog/blob/main/src/pages/index.astro"
click node_catalog "https://github.com/0329zdn/astro-blog/blob/main/src/pages/catalog.astro"
click node_blog_detail "https://github.com/0329zdn/astro-blog/blob/main/src/pages/blog/%5Bid%5D.astro"
click node_blog_collection "https://github.com/0329zdn/astro-blog/blob/main/src/content.config.ts"
click node_blog_posts "https://github.com/0329zdn/astro-blog/tree/main/src/content/blog"
click node_base_layout "https://github.com/0329zdn/astro-blog/blob/main/src/layouts/BaseLayout.astro"
click node_header "https://github.com/0329zdn/astro-blog/blob/main/src/components/Header.astro"
click node_footer "https://github.com/0329zdn/astro-blog/blob/main/src/components/Footer.astro"
click node_global_styles "https://github.com/0329zdn/astro-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_home,node_catalog,node_blog_detail toneBlue
class node_blog_collection,node_blog_posts toneAmber
class node_base_layout,node_header,node_footer,node_global_styles toneMint
class node_visitor toneIndigo
```

## Components

### Site routes

- [Home page](https://github.com/0329zdn/astro-blog/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Catalog page](https://github.com/0329zdn/astro-blog/blob/main/src/pages/catalog.astro): `src/pages/catalog.astro`
- [Blog detail page](https://github.com/0329zdn/astro-blog/blob/main/src/pages/blog/%5Bid%5D.astro): `src/pages/blog/[id].astro`

### Blog content

- [Blog collection](https://github.com/0329zdn/astro-blog/blob/main/src/content.config.ts): `src/content.config.ts`
- [Markdown posts](https://github.com/0329zdn/astro-blog/tree/main/src/content/blog): `src/content/blog`

### Presentation

- [Base layout](https://github.com/0329zdn/astro-blog/blob/main/src/layouts/BaseLayout.astro): `src/layouts/BaseLayout.astro`
- [Header](https://github.com/0329zdn/astro-blog/blob/main/src/components/Header.astro): `src/components/Header.astro`
- [Footer](https://github.com/0329zdn/astro-blog/blob/main/src/components/Footer.astro): `src/components/Footer.astro`
- [Global styles](https://github.com/0329zdn/astro-blog/blob/main/src/styles/global.css): `src/styles/global.css`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: requests route (evidence: `README.md`)
- Visitor → Catalog page: requests route (evidence: `README.md`)
- Visitor → Blog detail page: requests route (evidence: `README.md`)
- Blog collection → Markdown posts: loads and validates (evidence: `src/content.config.ts`)
