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/setup/DOCS_GENERATION.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Introduction
4
4
5
-
This guide explains how documentation generation is configured and works in the `ubm-f1tenth` repository.
5
+
This guide explains how documentation generation is configured and works across the repositories listed in `repositories.yaml`.
6
6
7
7
## Overview
8
8
@@ -16,29 +16,35 @@ The whole process is automatized with the use of GitHub Actions.
16
16
17
17
### Deployment with GitHub Actions
18
18
19
-
The CI/CD workflow automates the process of building and deploying documentation to GitHub Pages. The key steps in `.github/workflows/ci.yml` are:
19
+
The CI/CD workflow automates the process of building and deploying documentation to GitHub Pages. The key steps in `.github/workflows/ci.yaml` are:
20
20
21
-
1.**Clone ubm-f1tenth Repository**
21
+
1.**Clone configured repositories**
22
+
- The workflow reads `repositories.yaml` and clones each listed repository into `./repos/`.
23
+
- Add or remove repositories from that file to control which repositories are documented.
22
24
23
-
2.**Generate C++ Documentation**:
24
-
- Uses rosdoc2 to generate documentation for C++ packages found in the repository.
25
-
- The script searches for package.xml files in the ubm-f1tenth directory and identifies packages that use rosdoc2.
26
-
- For each identified package, it runs rosdoc2 build to generate HTML documentation, which is stored in a specified output directory.
27
-
- A markdown file (CPP_PACKAGES.md) is created listing the packages with links to their generated documentation.
25
+
2.**Generate repository pages**:
26
+
-`scripts/gen_repository_pages.py` creates a page for each repository listed in `repositories.yaml`.
27
+
- Each repository page contains two subsections: one for Python packages and one for C++ packages.
28
+
- The C++ subsection links to the rosdoc2 output generated for that repository.
28
29
29
-
3.**Move Python packages to src**:
30
-
- Copies Python packages found within the repository into the `src/` folder to prepare them for MkDocs documentation generation. This is done by checking for the presence of ament_python in each package.xml file.
30
+
3.**Generate C++ Documentation**:
31
+
- Uses rosdoc2 to generate documentation for C++ packages found in the configured repositories.
32
+
- The script searches for package.xml files under `./repos/` and identifies packages that use rosdoc2.
33
+
- For each identified package, it runs rosdoc2 build to generate HTML documentation, which is stored under a repository-specific output directory.
31
34
32
-
4.**Build Documentation**:
35
+
4.**Move Python packages to src**:
36
+
- Copies Python packages found within the configured repositories into the `src/` folder to prepare them for MkDocs documentation generation. This is done by checking for the presence of ament_python in each package.xml file.
37
+
38
+
5.**Build Documentation**:
33
39
- Runs MkDocs to generate static documentation from the source files.
34
40
- All the configs are set in the `mkdocs.yaml` file.
35
41
-`mkdocs build` clears the content of the `site/` directory, builds the content inside the `docs/` directory and processes with mkdocstrings the source code present in `src/` directory. The output will be in the `site` directory.
36
42
- Custom navigation is generated dynamically based on Python module structure by the `gen_ref_pages.py` present in the script/ folder.
37
43
38
-
5.**Add Additional Files to Site**:
44
+
6.**Add Additional Files to Site**:
39
45
- Copies the generated C++ documentation to the `site` directory for deployment.
40
46
41
-
6.**Deploy with ghp-import**:
47
+
7.**Deploy with ghp-import**:
42
48
- Deploys the content of `site/` to GitHub Pages using the `ghp-import` tool.
0 commit comments