Skip to content

Commit 4e0729d

Browse files
committed
Add building instructions
1 parent f9cef12 commit 4e0729d

2 files changed

Lines changed: 112 additions & 1 deletion

File tree

README.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,101 @@ The current build logs of the documentation can be found in [Github Actions](htt
1515
### Broken links
1616

1717
Detail of broken links in the doc can be found in the build logs. Select a build in Github Action "Deploy", then "Usage". Click on "build" and expand again the "Build line". Search for "WARNING".
18+
19+
## Building Documentation Locally
20+
21+
You can build the documentation locally on your computer to preview changes before committing them.
22+
23+
### Prerequisites
24+
25+
Ensure Python 3.8+ is installed on your system. Install the required dependencies from the root of the repository:
26+
27+
```console
28+
pip install -r requirements.txt
29+
```
30+
31+
### Building
32+
33+
Build the English documentation:
34+
35+
```console
36+
cd docs/EN
37+
sphinx-build -M html . _build
38+
```
39+
40+
The built documentation will be in `docs/EN/_build/html/`. Open `index.html` in your browser to view it.
41+
42+
To build a different language (e.g., Czech):
43+
44+
```console
45+
cd docs/CROWDIN/cs
46+
sphinx-build -M html . _build
47+
```
48+
49+
## Quality Check Utility
50+
51+
The `qualitycheck.py` script in the `utils/` folder validates the documentation for common issues like broken links, missing images, and orphaned files.
52+
53+
### Basic Usage
54+
55+
Check the English documentation:
56+
57+
```console
58+
python utils/qualitycheck.py
59+
```
60+
61+
Check a specific language (e.g., Czech):
62+
63+
```console
64+
python utils/qualitycheck.py --lang cs
65+
```
66+
67+
Check all languages (English + all CROWDIN translations):
68+
69+
```console
70+
python utils/qualitycheck.py --lang all
71+
```
72+
73+
### Available Options
74+
75+
- `--lang <code>` - Language selector (default: `EN`). Use CROWDIN language codes like `cs`, `de`, `fr`, or `all` for all languages.
76+
77+
- `--docs-root <path>` - Docs root folder (default: `docs`).
78+
79+
- `--check-remote-links` - Also validate non-image remote links (http/https). This enables checking that external links are accessible.
80+
81+
- `--fail-on-unused` - Fail (exit with non-zero code) if unused pictures are found. Useful for CI/CD pipelines.
82+
83+
- `--timeout <seconds>` - HTTP timeout in seconds for remote checks (default: 8). Increase if checking remote links on slow connections.
84+
85+
- `--workers <number>` - Number of parallel workers for remote checks (default: 12). Adjust based on your system resources.
86+
87+
### Checks Performed
88+
89+
The utility performs the following validations:
90+
91+
1. **Broken anchors and reference calls** - Detects invalid anchor links and references within the documentation.
92+
2. **Broken local links** - Finds links to non-existent local files.
93+
3. **Missing pictures** - Identifies image references that point to non-existent files.
94+
4. **Remote pictures** - Validates that remote images are accessible (when `--check-remote-links` is used).
95+
5. **Unused pictures** - Detects image files that are not referenced anywhere in the documentation.
96+
97+
### Examples
98+
99+
Validate English docs with all remote checks:
100+
101+
```console
102+
python utils/qualitycheck.py --check-remote-links
103+
```
104+
105+
Validate Czech docs and fail if unused images are found:
106+
107+
```console
108+
python utils/qualitycheck.py --lang cs --fail-on-unused
109+
```
110+
111+
Validate all languages with increased timeout and worker count:
112+
113+
```console
114+
python utils/qualitycheck.py --lang all --check-remote-links --timeout 15 --workers 20
115+
```

utils/readme.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,24 @@ https://docs.readthedocs.io/en/stable/api/v3.html#token
3838
$ python importRedirects.py <APIKEY>
3939
```
4040

41-
### Import Redirects
41+
### Delete All Redirects
4242

4343
This script removes all redirect from the project. The script could be used for testing or maintenance.
4444
**NOTE: this script will remove all redirects, including the ones that are manual added trough the GUI.
4545

4646
``` console
4747
$ python deleteAllRedirects.py <APIKEY>
4848
```
49+
50+
## Building Documentation Locally
51+
52+
You can build the documentation locally on your computer to preview changes before committing them.
53+
54+
### Prerequisites
55+
56+
First, ensure Python 3.8+ is installed on your system. Then install the required dependencies from the root of the repository.
57+
58+
### Python Environment
59+
60+
1. **Create a virtual environment** (recommended):
61+

0 commit comments

Comments
 (0)