See Docker steps if you're using Docker container. See Virtual Environment if you're using Python venv.
Checkout this repo and execute the below commands.
> docker build . -t sphinx:latest
> docker run --rm -it -h sphinx -v $(pwd):/mnt/host/docs -w /mnt/host/docs -p 8000:8000 sphinx
You can now begin on documentation and following the build steps guide.
If python virtual environment is not created for your local docs directory start with Installation steps for Ubuntu, else you can activate the virtual environment using Activation and Deactivation steps.
> sudo apt install python3.8
> python3 -m venv venv
> source venv/bin/activate
> pip3 install -r requirements.txt
To activate the virtual environment created in your repo follow the below step. Ignore if already activated.
> source venv/bin/activate
Activation of virtual environment can be confirmed as (venv) appears on the left side of the terminal then you can begin on documentation and following the build steps guide.
Simple deactivate
command will exit the activated virtual environment.
(venv)> deactivate
> # To clean the generated html files, inside venv run
> make clean
> # To generate html pages and warn for spellings and broken links
> make html -b spelling -b linkcheck
NOTE
If there are any false positives in spellings, they can be added to Spelling file.
> # To generate html pages from rst files and present them in the browser as we make changes use
> sphinx-autobuild ./source/ ./build/html/ --port 8000 --host 0.0.0.0
From now any updates to files will be reflected on local host in real time. Open the url - http://127.0.0.1:8000 in your browser.