Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

No Format
# documentation
.tox
docs/_build/

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:

No Format
---
version: 2

formats:
  - htmlzip

build:
  image: latest

python:
  version: 3.7
  install:
    - requirements: docs/requirements-docs.txt

sphinx:
  configuration: docs/conf.py

Step 1.2 3: Create file tox.ini

Create or extend a file in the root of your repostory called tox.ini with the following content.

...

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"

No Format
mkdir 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:

https://gerrit.o-ran-sc.org/r/gitweb?p=doc.git;a=blob;f=docs/_static/logo.png;h=c3b6ce56468d87a3d9463ee75297b3895fc9a414;hb=refs/heads/master

Step 2.3: Create file docs/conf.py with exactly the following content:

No Format
from docs_conf.conf import *
linkcheck_ignore = [
    'http://localhost.*',
    'http://127.0.0.1.*',
    'https://gerrit.o-ran-sc.org.*'
]

Step 2.4 Create file docs/conf.yaml with the following content, but be sure to use your project name, not "your-repo":

No Format
---
project_cfg: oran
project: your-repo

Step 2.5: Create a new image file docs/favicon.ico here's a good source for the icon:

https://gerrit.o-ran-sc.org/r/gitweb?p=doc.git;a=blob;f=docs/favicon.ico;h=00b0fd0ef0b4e78fbb8cdb413ce84561dfeb404f;hb=refs/heads/master

Step 2.6: Create file docs/requirements-docs.txt with exactly the following content:

...