Skip to content

Commit

Permalink
Add contributor documentation for the docs (#5108)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Jul 16, 2024
1 parent ca85767 commit eb48a8e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,49 @@ You can enable `trace` level logging using the `RUST_LOG` environment variable,
RUST_LOG=trace uv
```

## Documentation

To preview any changes to the documentation locally:

1. Install the [Rust toolchain](https://www.rust-lang.org/tools/install).

1. Run `cargo dev generate-all`, to update any auto-generated documentation.

1. Install MkDocs and Material for MkDocs with:

```shell
uv venv

# For contributors.
uv pip install -r docs/requirements.txt

# Or, for members of the Astral org, which has access to MkDocs Insiders via sponsorship.
uv pip install -r docs/requirements.insiders.txt
```

1. Run the development server with:

```shell
# For contributors.
mkdocs serve -f mkdocs.public.yml
# For members of the Astral org, which has access to MkDocs Insiders via sponsorship.
mkdocs serve -f mkdocs.insiders.yml
```

The documentation should then be available locally at
[http://127.0.0.1:8000/uv/](http://127.0.0.1:8000/uv/).

To update the documentation dependencies, edit `docs/requirements.in` and `docs/requirements.insiders.in`, then run:

```shell
uv pip compile docs/requirements.in -o docs/requirements.txt --universal -p 3.12
uv pip compile docs/requirements.insiders.in -o docs/requirements.insiders.txt --universal -p 3.12
```

Documentation is deployed automatically on release by publishing to the [Astral documentation](https://github.com/astral-sh/docs)
repository, which itself deploys via Cloudflare Pages.

## Releases

Releases can only be performed by Astral team members.
Expand Down

0 comments on commit eb48a8e

Please sign in to comment.