pages — published docs content + navigation (Nextra)
Purpose
The published documentation. Every .mdx here becomes a route under aipowergrid.io/docs.
Navigation (sidebar order, labels, separators, external links) is data-driven by _meta.tsx.
Ownership
- Top-level
.mdx— the docs pages:index,quick-start,generate,streaming-api(OpenAI/Anthropic-compatible API),developers,run-a-node,worker-llm,worker-media,validator-node,grid-overview,proof-of-quality,autonomous-network,confidential-computing,tokenomics,staking,arc20_token_network,whitepaper,about. _meta.tsx— top-level sidebar: ordered keys, section separators (Use the Grid / Run a Node / The Grid / Economy / Reference), externalpage-type links (Discord, GitHub), and hidden sections (ai-workersisdisplay: hidden).p2p/— P2P mode (beta) docs subsection with its own_meta.tsx.ai-workers/— legacy worker docs; hidden from main nav (kept reachable, not promoted)._app.tsx— Next app wrapper; imports../styles/globals.css.
Local Contracts
- A page is invisible until it is in
_meta.tsx. Addingfoo.mdxrequires a"foo"key in the same directory’s_meta.tsxto appear in the sidebar with the right label/position. - Sidebar order follows
_meta.tsxkey order, not the filesystem. .mdxmay use Nextra components (Callout,Cards) and frontmatter (title,descriptionfor SEO). Keep frontmatterdescriptionset on user-facing pages.- Internal links account for
basePath: /docs; static assets referenced as/docs/.... - Subdirectories get their own
_meta.tsxfor their local sidebar (seep2p/,ai-workers/).
Work Guidance
- New page: create
pages/<name>.mdx(with frontmatter) + register inpages/_meta.tsx. - New subsection: create
pages/<dir>/withindex.mdx+ a_meta.tsx, then add the dir key topages/_meta.tsx. - Hiding a page from nav:
display: "hidden"in_meta.tsx. External link:type: "page"withhref+newWindow.
Verification
npm run devand confirm the page renders and appears in the sidebar at the intended spot.
Child DOX Index
- None —
p2p/andai-workers/are content subsections governed by this doc + their own_meta.tsx; no separate contracts.