Documentation site for Magistrala, built with Fumadocs and Next.js.
Visiting /docs/magistrala/ redirects to /docs/magistrala/user-guide/architecture/.
pnpm devOpen http://localhost:3000 with your browser to see the result.
This site uses:
- Next.js static export —
next buildoutputs static files toout/ - Next.js
basePath— generates links and assets under/docs/magistrala - Post-build nesting —
scripts/nest-static-export.mjsmoves the export underout/docs/magistrala/so Cloudflare static assets can serve it from the route prefix without custom Worker code
| Setting | Value |
|---|---|
| Build command | pnpm run build |
| Deploy command | npx wrangler deploy |
| Version command | npx wrangler versions upload |
| Root directory | / |
flowchart LR
subgraph Build_and_Deploy
A[Git push] --> B[Cloudflare build trigger]
B --> C[pnpm run build]
C --> D[next build — static export]
D --> E[nest export under out/docs/magistrala]
B --> F[npx wrangler deploy]
E --> G[Cloudflare static assets]
F --> G
end
subgraph Runtime_Request_Flow
U[Browser request] --> H[Cloudflare static asset route]
H --> J[Static asset lookup]
J --> U
end
Only one runtime variable is needed:
NEXT_PUBLIC_BASE_URL=https://absmach.eu/docs/magistralaSet this as a Cloudflare build variable so it is embedded into the static output at build time.
| Path | Description |
|---|---|
app/[[...slug]] |
Documentation pages and root redirect |
app/api/search/route.ts |
Static search index route handler |
app/og/[...slug] |
OG image generation for docs pages |
app/llms-full.txt |
LLM-readable full docs text |
content/docs |
MDX source files |
lib/source.ts |
Fumadocs source adapter |
lib/layout.shared.tsx |
Shared layout options |
scripts/nest-static-export.mjs |
Moves static export under /docs/magistrala |