Added MkDocs section to CONTRIBUTING.md (#2803)

This commit is contained in:
trag1c 2023-02-12 17:07:24 +01:00 committed by GitHub
parent 1d4422f004
commit b8835c2e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 1 deletions

View File

@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-python@v4
- name: "Install dependencies"
run: |
pip install "mkdocs~=1.4.2" "mkdocs-material~=9.0.6"
pip install -r docs/requirements.txt
- name: "Copy README File"
run: |
python scripts/transform_readme.py --target mkdocs

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ crates/ruff/resources/test/cpython
docs/*
!docs/rules
!docs/assets
!docs/requirements.txt
mkdocs.yml
.overrides

View File

@ -170,6 +170,26 @@ lives in `crates/ruff/src/flake8_to_ruff/converter.rs`.
Finally, regenerate the documentation and generated code with `cargo dev generate-all`.
## MkDocs
To preview any changes to the documentation locally:
1. Install MkDocs and Material for MkDocs with:
```shell
pip install -r docs/requirements.txt
```
2. Generate the MkDocs site with:
```shell
python scripts/generate_mkdocs.py
```
3. Run the development server with:
```shell
mkdocs serve
```
The documentation should then be available locally at
[http://127.0.0.1:8000/docs/](http://127.0.0.1:8000/docs/).
## Release process
As of now, Ruff has an ad hoc release process: releases are cut with high frequency via GitHub

3
docs/requirements.txt Normal file
View File

@ -0,0 +1,3 @@
mkdocs~=1.4.2
mkdocs-material~=9.0.6
PyYAML~=6.0