How hexui-sh/docs-template works
This repository is a Next.js/Fumadocs documentation-site template. Authors maintain MDX documents and collection metadata; visitors navigate documentation routes, read rendered pages, and search the collection. The runtime also exposes Markdown/LLM-oriented content routes and page actions that link to source or external assistants. The graph emphasizes those product paths and the shared content-source layer. The README describes broader customization and responsive/theme capabilities; their detailed wiring is not sampled, so those components are represented at their supported directory paths without speculative call edges.
Main entry points: page.tsx Page resolution · source.ts Content source loader · layout.tsx Root documentation layout · route.ts LLM content route
Components 20
Documentation content
- MDX collections
content/docs - Collection definition
source.config.ts - Content source loader
lib/source.ts
Page runtime
- Page resolution
app/[[...slug]]/page.tsx - Collection routing
lib/docs-collections.ts - Root documentation layout
app/layout.tsx
Reading experience
- MDX component registry
mdx-components.tsx - Page actions
components/docs-page-actions.tsx - Site navigation and header
components/docs-site-header.tsx - Documentation UI
components
Search and export
- Search endpoint
app/api/search/route.ts - LLM content route
app/llms.mdx/docs/[[...slug]]/route.ts
Site configuration
- Shared route config
lib/shared.ts - Layout options
lib/layout.shared.tsx - Branding settings
lib/site-config.ts
Other components
- Documentation author
- Documentation visitor
- LLM client
- Search user
- Markdown consumer
Connections 20
- Documentation author → MDX collections: writes MDX
- Collection definition → MDX collections: defines collection
- Content source loader → MDX collections: loads content
- Page resolution → Collection routing: resolves redirects
- Page resolution → Content source loader: looks up page
- Page resolution → MDX component registry: renders MDX
- Page resolution → Page actions: provides page links
- Documentation visitor → Page resolution: requests page
- Root documentation layout → Content source loader: reads page tree
- Root documentation layout → Layout options: gets options
- Root documentation layout → Site navigation and header: sets header slot
- Root documentation layout → Documentation UI: composes layout
- Layout options → Branding settings: reads settings
- Search endpoint → Content source loader: indexes source
- Search user → Search endpoint: queries
- LLM content route → Content source loader: reads page text
- LLM content route → Shared route config: uses content routes
- Markdown consumer → LLM content route: requests content
- LLM client → Page actions: opens assistant link
- Page actions → Markdown consumer: links Markdown