This repository contains the documentation build pipeline for LangChain projects. It converts markdown and notebook files into a format suitable for Mintlify documentation sites.
The pipeline is structured with source files in /src and build artifacts in /build. Mintlify deploys from the /build folder, which is generated by preprocessing logic - never edit /build directly. Documentation changes follow a PR workflow where all tests must pass before merging. Publishing is handled by the publish workflow (requires authorization), and preview branches are available for testing changes.
src/ # Source documentation files (edit these)
build/ # Generated output files (do not edit)
pipeline/ # Build pipeline source code
tests/ # Test files for the pipeline
Makefile # Build automation
README.md # This file
Install mint from https://mintlify.com/docs/installation
-
Install uv:
Install
uvfrom https://docs.astral.sh/uv/ -
Create and activate virtual environment:
cd docs uv venv source .venv/bin/activate
-
Install dependencies:
uv sync --all-groups
-
Install Mintlify CLI
The docs CLI uses parts of the Mintlify CLI so you need to install that too.
npm i -g mint
-
Use the docs CLI tool:
After setup, you'll have access to the
docscommand:docs --help
Common commands:
docs dev- Start development mode with file watchingdocs build- Build documentationdocs migrate <path>- Convert MkDocs markdown files to Mintlify formatdocs migrate-docusaurus <path>- Convert Docusaurus markdown files to Mintlify format
You can use the Makefile for easier build and development:
-
Start development mode, from the src/ dir:
mint dev
This watches for changes in
src/and automatically rebuilds content inbuild/.Alternatively, you can
make build, and launchmintinside thebuild/directory to preview changes. -
Build documentation:
make build
Generates compiled .mdx files in the
build/directory.
- Only edit files in
src/- Thebuild/directory is automatically generated - Use Mintlify syntax - See Mintlify documentation for formatting guidelines
- Test your changes - Use
make devto preview changes locally
make dev- Start development mode with file watching and live rebuildmake build- Build documentation to./builddirectorymake install- Install all dependenciesmake clean- Remove build artifactsmake test- Run the test suitemake lint- Check code style and formattingmake format- Auto-format codemake help- Show all available commands
The docs command (installed as uv run docs) provides additional functionality:
-
docs migrate <path>- Convert MkDocs markdown/notebook files to Mintlify format--dry-run- Preview changes without writing files--output <path>- Specify output location (default: in-place)- Supports
.md,.markdown,.ipynbfiles
-
docs migrate-docusaurus <path>- Convert Docusaurus markdown/notebook files to Mintlify format--dry-run- Preview changes without writing files--output <path>- Specify output location (default: in-place)- Supports
.md,.markdown,.mdx,.ipynbfiles - Converts Docusaurus-specific syntax (admonitions, tabs, imports, etc.)
-
docs mv <old_path> <new_path>- Move files and update cross-references--dry-run- Preview changes without moving files
These can be used directly using the Makefile or via the docs CLI tool:
-
docs dev- Start development mode with file watching--skip-build- Skip initial build and use existing build directory
-
docs build- Build documentation files--watch- Watch for file changes after building
- Markdown files (
.md,.mdx) - Standard documentation content - Jupyter notebooks (
.ipynb) - Converted to markdown during build - Assets - Images and other files are copied to the build directory
This project uses Mintlify for documentation generation. Key features:
- Frontmatter - YAML metadata at the top of files
- Components - Special Mintlify components for enhanced formatting
- Code blocks - Syntax highlighting and copy functionality
- Navigation - Automatic sidebar generation from file structure
Refer to the Mintlify documentation for detailed syntax and component usage.
Run the test suite to ensure your changes don't break existing functionality:
make testBefore submitting changes, ensure your code passes linting:
make lint
make format- Edit files in
src/ - Run
make devto start the development server - The build system will automatically detect changes and rebuild
- Preview your changes in the generated
build/directory
Once you have a PR open and are ready to preview changes, create a preview branch:
-
Go to Create a preview branch.
-
Click the Run workflow button.
-
Select your branch.
-
Click Run workflow.
-
Once the workflow is done running, click into the related job.
-
In the Create and publish preview branch step, look for the preview branch's name.

-
Copy the preview branch's name.
-
In the Mintlify dashboard, click Create preview deployment.
-
Enter the preview branch's name.
-
Click Create deployment. A Manual update will display in the Previews table.
-
Select the preview and click Visit to view the preview build.
To redeploy the preview build, click Redeploy on the Mintlify dashboard.
Once your branch has been merged into main, you need to push the changes to prod for them to render on the live docs site. Use the Publish documentation GH action:
- Go to Publish documentation.
- Click the Run workflow button.
- Select the main branch to deploy.
- Click Run workflow.