Top-level layout
content/ directory
This is where all documentation content lives. It is the only directory you need to edit when contributing documentation changes.
The content/ directory is organized by product:
- MDX content files — the documentation pages
- Navigation data files — JSON files (e.g.,
docs-nav-data.json) that define the sidebar structure - Image assets — product images referenced in the documentation
- A
README.md— product-specific contributing guidance
app/api/ directory
Contains the Next.js API Route Handlers that serve documentation content to the dev-portal. These are not content files — they are the server-side logic for the unified docs API.
API routes also read from
app/api/docsPaths.json and app/api/versionMetadata.json, which are generated files created by the prebuild process. Do not edit these files manually.scripts/ directory
Contains Node.js and shell scripts used for content processing and maintenance.
| Script | Purpose |
|---|---|
| Prebuild scripts | Process raw content from /content into the public/ output directory. Run automatically inside the Docker container and via npm run prebuild. |
| Migration scripts | Help migrate documentation from product repositories into the unified docs format. Used when onboarding a new product. |
update-mdx-files.sh | Adds a migration notice to MDX files in the original product repo location, redirecting contributors to web-unified-docs. |
| Broken link scripts | Scripts that power the automated broken link checker. Can be run locally via npm run broken-link. |
docs/ directory
Contains documentation about the repository itself — not product documentation for developer.hashicorp.com.
docs/decisions/ record significant architectural choices made during the design and build of this system.
public/ directory
Generated output produced by the prebuild process. Do not edit files in this directory — they are overwritten every time npm run prebuild runs.