You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/documentation.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,38 +6,42 @@ To contribute to the Binary Ninja documentation, first sign the [contribution li
6
6
7
7
## Prerequisites
8
8
9
-
The Python documentation tools are managed with [poetry]. Building every documentation surface requires:
9
+
The Python documentation tools are managed with [uv]. Building every documentation surface requires:
10
10
11
-
- Python 3.10 or newer and [poetry].
11
+
- Python 3.10 or newer and [uv].
12
12
- Doxygen 1.12 or newer available on `PATH` for the C++ API reference.
13
13
- A matching Binary Ninja installation whose `binaryninja` Python module can be imported. The API revision must match the installation's `api_REVISION.txt`.
14
14
15
-
`poetry install` installs [zensical], [sphinx], and [breathe]. It does not install Doxygen or Binary Ninja.
15
+
`uv sync --locked` installs [zensical], [sphinx], and [breathe]. It does not install Doxygen or Binary Ninja.
echo Python API documentation available in build/html
28
28
cd cppdocs
29
-
poetry run make html
29
+
uv run --locked make html
30
30
echo C++ API documentation available in html/
31
31
```
32
32
33
+
On Windows, use `uv run --locked cmd.exe /d /c .\make.bat html` in both
34
+
`api-docs` and `api-docs/cppdocs` in place of `uv run --locked make html`.
35
+
Use the same command with `clean` to remove the generated output.
36
+
33
37
`scripts/zensical_build.py` runs `zensical build` and then writes the redirect stubs described by `[project.plugins.redirects.redirect_maps]` in `zensical.toml`.
34
38
35
39
## Validating
36
40
37
41
Every build runs `zensical build --strict`, which fails on links to pages or anchors that do not exist. That covers internal references only. External URLs are checked separately by `scripts/check_links.py`, which requests every external URL in `docs/` and reports the file and line of any that fail:
38
42
39
43
```bash
40
-
poetry run python scripts/check_links.py
44
+
uv run --locked python scripts/check_links.py
41
45
```
42
46
43
47
It is slow and depends on the network, so run it out of band rather than as part of a build. Sites that block automated requests are reported separately from broken links and do not affect the exit code unless `--strict` is passed.
@@ -46,11 +50,11 @@ It is slow and depends on the network, so run it out of band rather than as part
46
50
Changing documentation for the API itself is fairly straightforward. Use [doxygen style comment blocks](https://www.doxygen.nl/manual/docblocks.html) in C++ and C, and [restructured text blocks](https://sphinx-tutorial.readthedocs.io/step-1/) for python for the source. The user documentation is located in the `docs/` folder and the API documentation is generated from the config in the `api-docs` folder.
47
51
48
52
!!! Tip "Tip"
49
-
When updating user documentation, the `poetry run zensical serve` feature is particularly helpful for live previews.
53
+
When updating user documentation, the `uv run --locked zensical serve` feature is particularly helpful for live previews.
0 commit comments