Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Hashicorp Unified Docs

License

NotificationsYou must be signed in to change notification settings

hashicorp/web-unified-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

This README is for developers working on the documentation website. If youwant to contribute docs content, refer to theContribute to HashiCorpdocumentation guide.


The project in this repository,hashicorp/web-unified-docs, aims to implement[DEVDOT-023] Unified Product Documentation Repository. The RFC for this project was intentionally light on implementation details, in order to foster consensus on the broad direction.

  • PR previews: Show broken links in comments for awareness (informational only, don't block PRs)
  • Production monitoring: Weekly scans create GitHub issues and send critical alerts to Datadog when users are affected

The weeklybroken-link-check-full workflow generates comprehensive broken link reports with prioritization guidance. When contributors create PRs that modify content, the link checker shows any broken links in PR comments with actionable guidance without blocking development.

Quick tips for contributors:

  • Fix internal HashiCorp links (high priority)
  • Check external docs/API links (medium priority)
  • Consider removing unreliable external links (low priority)

For detailed information about the monitoring system, seeBroken LinkMonitoring Documentation. TheUnified Product DocumentationRepository RFCfor this project was intentionally light on implementation details, in orderto foster consensus on the broad direction.

The existing API (content.hashicorp.com) has endpoints that serve documentation content. You can find the source code inhashicorp/mktg-content-workflows.

The goal of the unified docs API is to host all of HashiCorp's product documentation. The unified docs API will eventually replace the existing content API.

Local development

Requirements

Quick start

To get a migration preview running, runmake from the root of this repo. Themake command starts theunified-docs Docker profile that spins up a local instance ofunified-devdot-api anddev-portal.

Once this command completes, you can access the following endpoints:

  • http://localhost:3000 - An instance of thedev-portal container configured to pull from the experimental docs API (this repo). This image depends on the unified docs API (unified-devdot-api).

  • http://localhost:8080 - An instance of the unified docs API container (this repo -unified-devdot-api) that serves content from thecontent directory. On startup, this container processes the content and assets in/content intopublic/assets andpublic/content. In addition, the container also generatesapp/api/docsPaths.json andapp/api/versionMetadata.json from the contents within/content.

    Use the following example to test this endpoint:http://localhost:8080/api/content/terraform-plugin-framework/doc/latest/plugin/framework

Note

The unified docs API container takes time to process the content and assets. You must wait for both theunified-devdot-api anddev-portal containers to complete before you can successfully test content in thedev-portal preview environment (localhost:3000). Visithttp://localhost:8080/api/all-docs-paths to verify theunified-devdot-api container is complete.

To spin this down gracefully, runmake clean in a separate terminal.

If you wish to remove the local Docker images as well, runmake clean CLEAN_OPTION=full.

More commands

Themakefile serves as a convenience tool start the local preview. If you need more granular control, thepackage.json file contains a full list of available commands.

To use these, you will need to intentionally runnpm install andnpm run prebuild before anything else.

Usenpm run coverage to run coverage tests.

Preview environments for unified-docs and dev-portal

Unified docs API serves as one of the content APIs fordev-portal (frontend application for DevDot). As a result, when implementing new features, you may need to modify both the backend (this repo) and the frontend (dev-portal).

If you are working on a ticket that requires changes to both the unified docs API anddev-portal, please setcustom environment variables for your branch in Vercel to simplify testing instructions.

For example, in Vercel, for yourdev-portal branch, you can set the following environment variables:

Environment variableValue
HASHI_ENVunified-docs-sandbox
UNIFIED_DOCS_API<UDR-Preview-URL>

Vercel will use these values to create deploy previews.

API development

Reach out to team #team-web-presence if you need to do local API development

Background

Project Rationale

  • Storing documentation in one branch of one repo dramatically simplifies the workflow for contributing documentation.
  • Publishing changes to multiple versions can be done in a single PR, as opposed to multiple PRs which is required by the current setup.
  • Finding and making the same change across multiple versions is as simple as doing a find-and-replace since all the versioned docs are on the filesystem at the same time.
  • Adding a new product is as easy as making a new folder, as opposed to the current process which requires code-changes on the API side and the installation of a GitHub App to monitor for events.
  • Sourcing from one branch in one repo eliminates the situation where a missed GitHub event can result in out-of-date documentation. If something goes wrong in the publishing process, simply run it again instead of relying on incoming commit/release events from the GitHub API.
  • Since we can make edits to all docs for all products and versions from a single PR, making platform-level changes is dramatically simplified (such as updating to MDX v2, or rewriting URLs).
  • Adding new features like content conformance (basically linting for docs) can be done for the entire codebase at once.
  • Removes the ability for docs to break the release workflow in product repos.
  • Enables us to support fully versioned deployment previews, whereas current previews are limited to the branch being modified.

Update product repo documentation

This script helps with product documentation migration to the web-unified-docs repository. When migrating documentation:

  1. Theweb-unified-docs repository becomes the source of truth
  2. Original documentation may remain temporarily as a fallback
  3. Users should be directed to make future changes inweb-unified-docs only

This script automatically adds a prominent notice to all MDX files in the original location, informing contributors where to make future changes.

./scripts/update-mdx-files.sh ~/Desktop/hashicorp/terraform-plugin-framework/website/docs

Example output:

Progress:Files processed: 135Files updated: 135Files with no frontmatter: 0Files with errors: 0Completed! All MDX files have been processed.

Run broken link checker locally

The repository uses a focused broken link monitoring system:

  • PR previews: Show broken links in comments for awareness (informational only, don't block PRs)
  • Production monitoring: Weekly scans create GitHub issues and Datadog alerts for user-facing problems

The weeklybroken-link-check-full workflow generates comprehensive broken link reports. When contributors create PRs that modify content, the link checker shows any broken links in PR comments without blocking development.

For detailed information about the monitoring system, seeBroken Link Monitoring Documentation.

UDR Migration Link Check

For teams migrating products to UDR (Unified Docs Renderer), use the dedicated migration workflow:

  1. Go toActions → UDR Product Link Check
  2. Click "Run workflow" and select your product
  3. Review migration-specific broken link analysis in the generated GitHub issue

This workflow provides targeted link checking with migration-focused reporting and prioritization.

Local Testing

You can also run the broken link checker locally. The following commands launch a lychee Docker container to check the content directories you specify.

Run the broken link checker on all content.

npm run broken-link

Check a specific directory within content.

npm run broken-link terraform-plugin-framework

Check multiple directories.

npm run broken-link terraform-plugin-framework-log terraform-plugin-mux

Architecture

The following diagram illustrates the relationships between the unified docs API (this repo),dev-portal, and the existing content API:

graph LR    subgraph "Content sources (non-migrated)"        BDY[boundary]        CSL[consul]        HCP[hcp-docs]        NMD[nomad]        PKR[packer]        SNT[sentinel]        TF[terraform]        TFC[terraform-cdk]        TFA[terraform-docs-agents]        TFD[terraform-docs-common]        VGT[vagrant]        VLT[vault]        WPT[waypoint]        CURALL["/content or /website"]        BDY & CSL & HCP & NMD & PKR & SNT & TF & TFC & TFA & TFD & VGT & VLT & WPT --> CURALL    end    subgraph "Migrated content repo"        TPF[terraform-plugin-framework]        TPL[terraform-plugin-log]        TPM[terraform-plugin-mux]        TPS[terraform-plugin-sdk]        TPT[terraform-plugin-testing]        TFE[terraform-enterprise]        MIGALL["/content"]        TPF & TPL & TPM & TPS & TPT & TFE --> MIGALL    end    subgraph "APIs"        CP[Content API<br>content.hashicorp.com]        UDR[Unified Docs Repository<br>web-unified-docs]    end    subgraph "Frontend"        DP[Dev Portal<br>dev-portal]    end    %% BDY & CSL & HCP & NMD & PKR & PTF & SNT & TF & TFC & TFA & TFD & VGT & VLT & WPT --> CP    %% TPF & TPL & TPM & TPS & TPT --> UDR    CURALL -->|Current content flow| CP    MIGALL -->|Migrated content| UDR    CP -->|Serves most content| DP    UDR -->|Serves unified/content content| DP    class TPF,TPL,TPM,TPS,TPT,BDY,CSL,HCP,NMD,PKR,PTF,SNT,TF,TFC,TFA,TFD,VGT,VLT,WPT productRepo
Loading

The diagram shows:

  • The content API — the existing system that sources product documentation content from product repositories
  • The unified docs API — the new system that sources product documentation from this repo's/content directory. The migrated repos will use a directory approach to versioning (rather than the historic branch and tag strategy)
  • The Dev Portal — the frontend that serves the main DevDot interface. Dev Portal sources its content from both the existing content API and unified docs API.

About

Hashicorp Unified Docs

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors248


[8]ページ先頭

©2009-2025 Movatter.jp