# voluxium/hub architecture

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

- Interactive diagram: https://gitdiagram.com/voluxium/hub
- Repository: https://github.com/voluxium/hub

## Overview

This is an Astro-powered Chinese-language article site: Markdown posts are organized by date and category, then presented through home, listing, category, and individual-post routes. Shared layouts and UI components support navigation and reading. Astro’s content configuration defines post metadata, while the configured Markdown processor adds math rendering and image captions. The README is an untouched Astro starter description, and page/layout source was not sampled, so detailed component wiring is uncertain and omitted.

Main entry points: [`src/pages/index.astro`](https://github.com/voluxium/hub/blob/main/src/pages/index.astro) (Home page), [`src/layouts`](https://github.com/voluxium/hub/tree/main/src/layouts) (Site layouts), [`src/pages/post/[slug].astro`](https://github.com/voluxium/hub/blob/main/src/pages/post/%5Bslug%5D.astro) (Post detail), [`src/pages/posts/[...page].astro`](https://github.com/voluxium/hub/blob/main/src/pages/posts/%5B...page%5D.astro) (Post listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content and processing"]
  node_posts["Markdown posts"]
  node_collection["Posts collection<br/>[content.config.ts]"]
  node_markdown["Markdown processing<br/>[astro.config.mjs]"]
  node_figure["Figure captions"]
  node_postutils["Post utilities<br/>[posts.ts]"]
end

subgraph group_routes["Site routes"]
  node_home["Home page<br/>[index.astro]"]
  node_detail["Post detail<br/>[&#91;slug&#93;.astro]"]
  node_listing["Post listings<br/>[&#91;...page&#93;.astro]"]
  node_category["Category listings"]
  node_source["Source page<br/>[source.astro]"]
end

subgraph group_presentation["Shared presentation"]
  node_layout["Site layouts"]
  node_nav["Navigation<br/>[Nav.astro]"]
  node_articlelist["Article lists"]
  node_card["Article card<br/>[ArticleCard.astro]"]
  node_pagination["Pagination<br/>[Pagination.astro]"]
  node_articlenav["Article navigation<br/>[ArticleNav.astro]"]
  node_toc["Table of contents<br/>[Toc.astro]"]
  node_calendar["Calendar"]
  node_profile["Profile card<br/>[ProfileCard.astro]"]
  node_banner["Banner<br/>[Banner.astro]"]
  node_theme["Theme toggle<br/>[ThemeToggle.astro]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"opens"| node_detail
node_visitor -->|"opens"| node_listing
node_visitor -->|"opens"| node_category
node_visitor -->|"opens"| node_source
node_posts -->|"loaded by"| node_collection
node_collection -->|"provides posts"| node_markdown
node_markdown -->|"runs plugin"| node_figure
node_home -->|"renders"| node_layout
node_detail -->|"renders"| node_layout
node_listing -->|"renders"| node_layout
node_category -->|"renders"| node_layout
node_source -->|"renders"| node_layout
node_home -->|"uses"| node_postutils
node_detail -->|"uses"| node_postutils
node_listing -->|"uses"| node_postutils
node_category -->|"uses"| node_postutils
node_layout -->|"renders"| node_nav
node_layout -->|"renders"| node_theme
node_home -->|"renders"| node_articlelist
node_articlelist -->|"renders"| node_card
node_listing -->|"renders"| node_pagination
node_category -->|"renders"| node_pagination
node_detail -->|"renders"| node_articlenav
node_detail -->|"renders"| node_toc
node_home -->|"renders"| node_calendar
node_home -->|"renders"| node_profile
node_home -->|"renders"| node_banner

click node_posts "https://github.com/voluxium/hub/tree/main/src/content/posts"
click node_collection "https://github.com/voluxium/hub/blob/main/src/content.config.ts"
click node_markdown "https://github.com/voluxium/hub/blob/main/astro.config.mjs"
click node_figure "https://github.com/voluxium/hub/blob/main/src/plugins/rehypeFigureCaption.mjs"
click node_postutils "https://github.com/voluxium/hub/blob/main/src/utils/posts.ts"
click node_home "https://github.com/voluxium/hub/blob/main/src/pages/index.astro"
click node_detail "https://github.com/voluxium/hub/blob/main/src/pages/post/%5Bslug%5D.astro"
click node_listing "https://github.com/voluxium/hub/blob/main/src/pages/posts/%5B...page%5D.astro"
click node_category "https://github.com/voluxium/hub/tree/main/src/pages/posts/category"
click node_source "https://github.com/voluxium/hub/blob/main/src/pages/source.astro"
click node_layout "https://github.com/voluxium/hub/tree/main/src/layouts"
click node_nav "https://github.com/voluxium/hub/blob/main/src/components/Nav.astro"
click node_articlelist "https://github.com/voluxium/hub/blob/main/src/components/ArticleListSection.astro"
click node_card "https://github.com/voluxium/hub/blob/main/src/components/ArticleCard.astro"
click node_pagination "https://github.com/voluxium/hub/blob/main/src/components/Pagination.astro"
click node_articlenav "https://github.com/voluxium/hub/blob/main/src/components/ArticleNav.astro"
click node_toc "https://github.com/voluxium/hub/blob/main/src/components/Toc.astro"
click node_calendar "https://github.com/voluxium/hub/blob/main/src/components/CalendarWidget.astro"
click node_profile "https://github.com/voluxium/hub/blob/main/src/components/ProfileCard.astro"
click node_banner "https://github.com/voluxium/hub/blob/main/src/components/Banner.astro"
click node_theme "https://github.com/voluxium/hub/blob/main/src/components/ThemeToggle.astro"

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_posts,node_collection,node_markdown,node_figure,node_postutils toneBlue
class node_home,node_detail,node_listing,node_category,node_source toneAmber
class node_layout,node_nav,node_articlelist,node_card,node_pagination,node_articlenav,node_toc,node_calendar,node_profile,node_banner,node_theme toneMint
class node_visitor toneIndigo
```

## Components

### Content and processing

- [Markdown posts](https://github.com/voluxium/hub/tree/main/src/content/posts): `src/content/posts`
- [Posts collection](https://github.com/voluxium/hub/blob/main/src/content.config.ts): `src/content.config.ts`
- [Markdown processing](https://github.com/voluxium/hub/blob/main/astro.config.mjs): `astro.config.mjs`
- [Figure captions](https://github.com/voluxium/hub/blob/main/src/plugins/rehypeFigureCaption.mjs): `src/plugins/rehypeFigureCaption.mjs`
- [Post utilities](https://github.com/voluxium/hub/blob/main/src/utils/posts.ts): `src/utils/posts.ts`

### Site routes

- [Home page](https://github.com/voluxium/hub/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Post detail](https://github.com/voluxium/hub/blob/main/src/pages/post/%5Bslug%5D.astro): `src/pages/post/[slug].astro`
- [Post listings](https://github.com/voluxium/hub/blob/main/src/pages/posts/%5B...page%5D.astro): `src/pages/posts/[...page].astro`
- [Category listings](https://github.com/voluxium/hub/tree/main/src/pages/posts/category): `src/pages/posts/category`
- [Source page](https://github.com/voluxium/hub/blob/main/src/pages/source.astro): `src/pages/source.astro`

### Shared presentation

- [Site layouts](https://github.com/voluxium/hub/tree/main/src/layouts): `src/layouts`
- [Navigation](https://github.com/voluxium/hub/blob/main/src/components/Nav.astro): `src/components/Nav.astro`
- [Article lists](https://github.com/voluxium/hub/blob/main/src/components/ArticleListSection.astro): `src/components/ArticleListSection.astro`
- [Article card](https://github.com/voluxium/hub/blob/main/src/components/ArticleCard.astro): `src/components/ArticleCard.astro`
- [Pagination](https://github.com/voluxium/hub/blob/main/src/components/Pagination.astro): `src/components/Pagination.astro`
- [Article navigation](https://github.com/voluxium/hub/blob/main/src/components/ArticleNav.astro): `src/components/ArticleNav.astro`
- [Table of contents](https://github.com/voluxium/hub/blob/main/src/components/Toc.astro): `src/components/Toc.astro`
- [Calendar](https://github.com/voluxium/hub/blob/main/src/components/CalendarWidget.astro): `src/components/CalendarWidget.astro`
- [Profile card](https://github.com/voluxium/hub/blob/main/src/components/ProfileCard.astro): `src/components/ProfileCard.astro`
- [Banner](https://github.com/voluxium/hub/blob/main/src/components/Banner.astro): `src/components/Banner.astro`
- [Theme toggle](https://github.com/voluxium/hub/blob/main/src/components/ThemeToggle.astro): `src/components/ThemeToggle.astro`

### Other components

- **Site visitor**

## Connections

- Site visitor → Home page: opens
- Site visitor → Post detail: opens
- Site visitor → Post listings: opens
- Site visitor → Category listings: opens
- Site visitor → Source page: opens
- Markdown posts → Posts collection: loaded by
- Posts collection → Markdown processing: provides posts
- Markdown processing → Figure captions: runs plugin
- Home page → Site layouts: renders
- Post detail → Site layouts: renders
- Post listings → Site layouts: renders
- Category listings → Site layouts: renders
- Source page → Site layouts: renders
- Home page → Post utilities: uses
- Post detail → Post utilities: uses
- Post listings → Post utilities: uses
- Category listings → Post utilities: uses
- Site layouts → Navigation: renders
- Site layouts → Theme toggle: renders
- Home page → Article lists: renders
- Article lists → Article card: renders
- Post listings → Pagination: renders
- Category listings → Pagination: renders
- Post detail → Article navigation: renders
- Post detail → Table of contents: renders
- Home page → Calendar: renders
- Home page → Profile card: renders
- Home page → Banner: renders
