This page provides instructions for configuring your component's documentation area so the O-RAN-SC Jenkins will automatically build and deploy the material to https://docs.o-ran-sc.org/ upon change of any file within your docs/ directory.
If you have questions about this process or need help, please contact the O-RAN-SC Documentation Project Technical Lead, weichen ni (email@example.com)
Note: please add weichen ni as a reviewer on all Gerrit doc changesets if you have any questions.
Configuration needed for your _repo/
Please use the automated setup process that is documented here:
If that process fails or you need to trouble-shoot problems, this page gives step by step details.
Manual Step 1: Add files to your-repo root
Step 1.1: Create or extend file .gitignore in the root of your repository with the following content:
Step 1.2: Create RTD config file
Create a file in the root of your repository called .readthedocs.yaml (yes there's a leading dot) with the following content:
Step 1.3: Create file tox.ini
Create or extend a file in the root of your repostory called tox.ini with the following content.
Please note that Python projects must not use all entries shown here. The entry "skipsdist = true" is only appropriate if the project has no setup.py file that defines how to build distributions.
Manual Step 2: Add files to your-repo/docs
In these steps you will create files in the "docs" subfolder of your repository. Please note that "docs" is a magic string, the directory name must be exactly that. Please use templates from the DOC area to create basic documentation files like "index.rst" and so on.
Step 2.1: Make a new directory "docs/_static"
Step 2.2: Create an image file logo.png in the new docs/_static/ directory. Here's a good source for the image:
Step 2.3: Create file docs/conf.py with exactly the following content:
Step 2.4 Create file docs/conf.yaml with the following content, but be sure to use your repo name, not "your-repo":
Step 2.5: Create a new image file docs/favicon.ico here's a good source for the icon:
Step 2.6: Create file docs/requirements-docs.txt with exactly the following content:
Step 3: Test locally
Working in the root of the repository, issue the following command to generate documentation. This assumes you have Python and Tox installed on the machine where you are working.
Note a common error message (see below) comes from RST formatting warning (warnings treated as errors). Fix the underlying RST (in the example that's installation-guides.rst) and try again.
If everything correct, you will see a succeed or successful output after running 'tox -e docs,docs-linkcheck'.
It is the time to upload your change to gerrit. When you merged your change, you project docs will show on the page : https://readthedocs.org/projects/o-ran-sc-doc/. If you can scroll down, and you project name will display on the right.
Please let DOC teamweichen niknow when you complete Step 3, as the configuration work in your_repo is finished, DOC team will handle Step 4 and make your docs work.
DOC team will do the Step 4 in DOC repo! If you are not from OSC DOC project, please do not do this step.
Step 4: Add a link to your-repo documentation
4.1 Clone the doc area via ssh. (best to just go here and select the ssh option "https://gerrit.o-ran-sc.org/r/admin/repos/doc"
4.2 Add a mapping from key to URL in the conf.py file, for example:
$ grep -r portal-ric-dashboard .
./index.rst:* :doc:`RIC Dashboard <portal-ric-dashboard:index>`
./conf.py:intersphinx_mapping['portal-ric-dashboard'] = ('https://docs.o-ran-sc.org/projects/ ' % branch, None)
4.3 Add a link to your mapping key in an appropriate file such as index.rst, for example:
Step 5: Test publication
Edit a file in your docs/ area, commit the file to git and push your commit to Gerrit for review. You should see a documentation build job start.