How ember-nexus/next-doc works
Next Doc is an Astro documentation site for the Ember Nexus API, with HTML and plain-Markdown documentation surfaces. The principal workflow is readers opening API or guide documentation, which is organized through shared routes/navigation and rendered with OpenAPI-derived request and response detail. Separate outputs include schema and command references, searchable graph/table examples, and an LLM-oriented Markdown index. The tree and excerpts establish some wiring, especially the llms.txt path; links for unsampled route implementations are intentionally limited.
Main entry points: pages Documentation pages · routes.ts Route helpers · llms.ts Markdown navigation body · llms.txt.ts llms.txt endpoint
Components 21
Docs content
- Documentation pages
core/src/pages - Content collections
core/src/lib/collections.ts - Navigation builder
core/src/lib/sidebar.ts - Route helpers
core/src/lib/routes.ts
API reference
- Endpoint reference
core/src/pages/api/[endpoint].md.ts - Schema reference
core/src/pages/schema/[schema].md.ts - Command reference
core/src/pages/command/[command].md.ts - OpenAPI extraction
core/src/util/SwaggerUtil.ts - Request response cards
core/src/mdmx/cards/index.ts
Rendering
- Markdown components
core/src/mdmx/registry/index.ts - Markdown JSX runtime
core/src/mdmx/jsx-runtime.ts - Markdown serializer
core/src/mdmx/serialize.ts - Content augmentations
core/src/plugins/rehype/index.ts - Code rendering
core/src/plugins/expressiveCode/index.ts - Interactive graph
core/src/component/Lit/Graph/Graph.ts - JSON data table
core/src/component/Lit/JsonTable.ts
Site outputs
- llms.txt endpoint
core/src/pages/llms.txt.ts - Markdown navigation body
core/src/lib/llms.ts - Page Markdown endpoint
core/src/pages/[...slug].md.ts - Social preview image
core/src/pages/open-graph/[...slug].png.ts
Other components
- Documentation reader
Connections 21
- Documentation reader → Documentation pages: opens docs
- Content collections → Navigation builder: organizes navigation
- Route helpers → Navigation builder: provides paths
- Documentation pages → Route helpers: maps page routes
- Endpoint reference → OpenAPI extraction: extracts API details
- Endpoint reference → Request response cards: appends reference cards
- Schema reference → OpenAPI extraction: uses schema details
- Command reference → Route helpers: uses command paths
- Markdown components → Markdown JSX runtime: renders Markdown JSX
- Content augmentations → Documentation pages: augments content
- Code rendering → Documentation pages: renders code
- Interactive graph → Documentation reader: displays graph data
- JSON data table → Documentation reader: displays JSON records
- llms.txt endpoint → Markdown navigation body: builds index body
- llms.txt endpoint → Markdown serializer: serializes body
- Markdown navigation body → Navigation builder: reads navigation
- Markdown navigation body → Route helpers: rewrites links
- Page Markdown endpoint → Markdown serializer: emits Markdown
- Documentation reader → llms.txt endpoint: requests index
- Documentation reader → Page Markdown endpoint: requests Markdown
- Documentation reader → Social preview image: requests preview