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..8282bed44c 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