From 4f042db13ae4915b76e96c2f90671e0c91403d00 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Sat, 22 Nov 2025 13:02:34 -0800 Subject: [PATCH 1/3] chore: improved guidelines on how to contribute to docs --- README.md | 2 ++ src/oss/contributing/documentation.mdx | 44 +++++++++++++++++++------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 421f75b669..105ee11d7b 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ To contribute to LangChain documentation, follow the steps outlined in the [contributing guide](https://docs.langchain.com/oss/python/contributing/overview). The contributing guide also explains our documentation types and their writing and quality standards. +For detailed information about setting up your development environment and contributing to documentation, see the [documentation contributing guide](https://docs.langchain.com/oss/python/contributing/documentation). + > [!IMPORTANT] > For contributing to reference docs, see the `README.md` file in the `/reference/python` and `/reference/javascript` directories. diff --git a/src/oss/contributing/documentation.mdx b/src/oss/contributing/documentation.mdx index f871d6de67..1f47019036 100644 --- a/src/oss/contributing/documentation.mdx +++ b/src/oss/contributing/documentation.mdx @@ -39,27 +39,49 @@ For larger changes, additions, or ongoing contributions, it's important to set u #### Set up local environment +Before you can work on this project, ensure you have the following installed: + +**Required:** + +- **Python** >= 3.13.0, < 4.0.0 +- **[uv](https://docs.astral.sh/uv/)** - Python package manager (used for dependency management) +- **Node.js** and **npm** - For Mintlify CLI and reference documentation builds +- **Make** - For running build commands (usually pre-installed on macOS/Linux) +- **Git** - For version control + +**Optional but recommended:** + +- **[markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)** - For linting markdown files + ```bash + npm install -g markdownlint-cli + ``` +- **[pnpm](https://pnpm.io/)** - Required only if you're working on reference documentation + ```bash + npm install -g pnpm@10.14.0 + ``` + +**Setup steps:** + 1. Clone the [`langchain-ai/docs`](https://github.com/langchain-ai/docs) repo. Follow the steps outlined in [`IDE_SETUP.md`](https://github.com/langchain-ai/docs/blob/main/IDE_SETUP.md). -2. [Install `uv`](https://docs.astral.sh/uv/) -3. [Install `npm`](https://nodejs.org/en/download/) -4. Create and activate a virtual environment: + +2. Install dependencies: ```bash - cd docs - uv venv - source .venv/bin/activate + make install ``` -5. Install dependencies: + This command will: + - Install Python dependencies using `uv sync --all-groups` + - Install Mintlify CLI globally via npm - ```bash - uv sync --all-groups - ``` +3. Verify your setup: ```bash - npm i -g mint + make build ``` + This should build the documentation without errors. + After install, you'll have access to the `docs` command: ```bash From f0166db579f218d9a1f6da5622e3306bafcfe9e7 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Sat, 22 Nov 2025 16:28:46 -0800 Subject: [PATCH 2/3] Update src/oss/contributing/documentation.mdx Co-authored-by: Mason Daugherty --- src/oss/contributing/documentation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/contributing/documentation.mdx b/src/oss/contributing/documentation.mdx index 1f47019036..8f3c5b9952 100644 --- a/src/oss/contributing/documentation.mdx +++ b/src/oss/contributing/documentation.mdx @@ -51,7 +51,7 @@ Before you can work on this project, ensure you have the following installed: **Optional but recommended:** -- **[markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)** - For linting markdown files +- **[`markdownlint-cli`](https://github.com/igorshubovych/markdownlint-cli)** - For linting markdown files ```bash npm install -g markdownlint-cli ``` From 4bb6ea16656948d6fb83b9558fdce07ded2ed606 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Sat, 22 Nov 2025 16:28:52 -0800 Subject: [PATCH 3/3] Update src/oss/contributing/documentation.mdx Co-authored-by: Mason Daugherty --- src/oss/contributing/documentation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/contributing/documentation.mdx b/src/oss/contributing/documentation.mdx index 8f3c5b9952..8282bed44c 100644 --- a/src/oss/contributing/documentation.mdx +++ b/src/oss/contributing/documentation.mdx @@ -55,7 +55,7 @@ Before you can work on this project, ensure you have the following installed: ```bash npm install -g markdownlint-cli ``` -- **[pnpm](https://pnpm.io/)** - Required only if you're working on reference documentation +- **[`pnpm`](https://pnpm.io/)** - Required only if you're working on reference documentation ```bash npm install -g pnpm@10.14.0 ```