dev-portal and web-unified-docs. This guide walks through both.
Refer to the Example PRs section at the bottom of this page for real-world examples from previous integrations.
Update the dev-portal API
Create a branch in dev-portal
Create a new branch for your changes in the
github.com/hashicorp/dev-portal repository.Register the docs in config/production.json
In Use a descriptive, slug-style name. The API uses this string internally.
config/production.json, add the name for your new docs to the flags.unified_docs_migrated_repos array:Update src/data/<product>.json
Make the following changes to
Example for the Terraform MCP server docs:
src/data/<product>.json:- Add a base slug to the
basePathsobject. Consider SEO — this slug is the first segment after the core product name in the URL (e.g.,developer.hashicorp.com/terraform/<base-path-slug>). - Add the base path slug to the
docsNavItemsobject so it appears in the navigation. - Add an object for the new docs with the following attributes:
| Field | Description |
|---|---|
iconName | For documentation, use "docs". Consult the web engineering team for other values. |
name | The public display name for the docs. |
path | Must match the value in basePaths and docsNavItems. |
productSlugForLoader | Must match the name you added to unified_docs_migrated_repos in config/production.json. |
Update the web-unified-docs API
Create a branch in web-unified-docs
Create a new branch in the
github.com/hashicorp/web-unified-docs repository.Add MDX files and nav.json
Add your
.mdx content files and a nav.json navigation file for the new docs set.Add a GitHub labeler entry
Open
.github/labeler.yml and add an entry so GitHub automatically labels PRs that touch your new directory:Add a CODEOWNERS entry (if needed)
If a specific team should be required reviewers, add them to the
CODEOWNERS file:Register the docs in productConfig.mjs
Add an entry for your docs to Example for the Terraform MCP server:
productConfig.mjs:Preview changes
Normal Vercel previews use the production state of the dev-portal API. Because your changes depend on a dev-portal API update that isn’t merged yet, you must manually configure Vercel to use your dev-portal preview branch.You need developer-level Vercel permissions to set environment variables. Request access before starting this process.
Open the dev-portal project in Vercel
Log into Vercel and navigate to the
dev-portal project settings.Create a UNIFIED_DOCS_API environment variable
- Go to Settings → Environment Variables → Create new.
- In the Environments section, disable Development so only Preview is selected.
- Click Select a custom Preview branch and choose your dev-portal branch.
- Set the variable key to
UNIFIED_DOCS_API.
Copy the web-unified-docs preview URL
In your
web-unified-docs PR, find the Vercel Previews Deployed section and copy the Unified Docs API preview URL (for example, https://web-unified-docs-beequ48j2-hashicorp.vercel.app/).