# Which Problems Are Solved Several links in the docs point at repository paths that no longer exist, so they 404 on GitHub: - The `load-test` directory was renamed to `benchmark`. The benchmarks page still links to `load-test`, `load-test/Makefile` and `load-test/README.md` (5 occurrences). - `apps/docs/content/index.mdx` links to `CONTRIBUTING.mdx`, but the file is `CONTRIBUTING.md`. - The login-app guide links to `apps/login/src/middleware.ts`, which was renamed to `apps/login/src/proxy.ts` in the Next.js 16 upgrade (#11629). # How the Problems Are Solved - Point the benchmarks page at `benchmark/`, `benchmark/Makefile` and `benchmark/README.md`. The `#test` anchor still resolves — `benchmark/README.md` has a `### Test` heading. - Fix the `CONTRIBUTING.md` extension. - Point the middleware example at `apps/login/src/proxy.ts`. Verified by extracting every `github.com/zitadel/zitadel/{blob,tree}/main/...` link from `apps/docs/content` and resolving each one against the working tree — all 14 distinct paths now exist. # Additional Changes - Prose in the benchmarks page that names the directory ("the load-test Makefile", "the load-test readme") now says "benchmark". Generic uses of "load-test"/"load-testing" as an activity are left as they are. # Additional Context - The versioned docs under `apps/docs/content/v4.13`–`v4.16` contain the same stale links, but those directories are generated at build time from release tags by `apps/docs/scripts/fetch-remote-content.mjs` and are gitignored, so they cannot be fixed from `main`. The published pages for those versions will keep the old links. - `apps/docs/scripts/check-links.ts` skips anything starting with `http`, which is why these went unnoticed. Teaching it to resolve `github.com/zitadel/zitadel/blob/main/<path>` links against the working tree would catch this class of breakage in CI — not done here to keep the PR focused. Co-authored-by: Claude Opus 5 <[email protected]>
@zitadel/docs
Documentation for Zitadel, built with Fumadocs and Next.js.
Getting Started
Ensure you have followed the root quick start to set up dependencies.
Local Development
Ensure all dependencies are installed:
pnpm install
Start the development server:
pnpm nx run @zitadel/docs:dev
The site will be available at http://localhost:3000.
Scripts
Key scripts for documentation workflows:
| Script | Description |
|---|---|
dev |
Starts the development server. |
build |
Builds the production application. |
fetch:remote-content |
Fetches remote tags and referenced content. |
generate |
Runs all generation steps (fetch:remote-content, generate:proto-docs, generate:api-reference, generate:index-pages). |
check:links |
Validates content integrity (broken links, missing frontmatter, schema errors). |
check-types |
Validates typescript types. |
test |
Runs all validation steps (check-types, check:links). |
lint |
checks for code style and syntax errors (ESLint). |
clean |
Cleans the build output and generated files. |
Validation
- Code Quality: Run
pnpm nx run @zitadel/docs:lintto check for syntax and style issues in JS/TS/MDX files. - Content Integrity: Run
pnpm nx run @zitadel/docs:check-linksto validate content structure, including:- Broken internal links
- Missing required front-matter (e.g.,
title) - Image references
Troubleshooting
Issue: Nx configuration not found or "nx" command not found
If you see errors like:
NX Cannot find configuration for task @zitadel/zitadel:@zitadel/docs:generate
Pass --verbose to see the stacktrace.
or
pnpm nx run @zitadel/docs:dev
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command "nx" not found
Did you mean "pnpm nx"?
Root cause: Your dependency cache or node_modules is out of sync.
Solution: Run these commands from the repository root in order:
- Clear node_modules:
rm -rf node_modules— removes the installed dependency folder - Clear pnpm cache:
pnpm cache delete— clears pnpm's internal package cache - Reinstall dependencies:
pnpm install— reinstalls all dependencies fresh - Test the setup:
pnpm nx run @zitadel/docs:generate— verifies everything works
This resolves 99% of setup-related issues.
Contributing
Build Process
The docs build process automatically handles the following steps via generate:
- Downloads required protoc plugins.
- Generates gRPC documentation from proto files.
- Generates API documentation from OpenAPI specs.
- Generates index files for directory structures.
Style Guide
- Variables: Use environment variables in code snippets where possible.
- Embedded Content: Use
_filename.mdxfor content embedded in other pages (not indexed individually). - Code Embedding: Use the
fileproperty in code blocks to embed code from the repo. - Voice: Use active voice and sentence case for titles.
Refer to the Google Developer Style Guide for general guidelines.
Adding Content
All documentation content is located in the content directory. Note that the system strictly accepts only .mdx files.
To add a new page:
- Create a
.mdxfile in the appropriate subdirectory ofcontent. - Register the new page in the sidebar settings at
lib/sidebar-data.tsto make it accessible in the navigation.
Pull Requests
Use docs(<scope>): <short summary> for PR titles.
Pass quality checks before submitting:
pnpm nx run @zitadel/docs:build