3. Sphinxο
Sphinx is a documentation generator. This means that it takes source files in plain text, and generates HTML files. In our case, it takes plain text files in reStructuredText format, and outputs HTML.
3.1. Installationsο
3.2. Suggested Sphinx extensionsο
Sphinx and the following suggested extensions can be installed individaully or via the requirements.txt file.
For sphinx-rtd-theme go to: https://pypi.org/project/sphinx-rtd-theme/
For sphinx-copybutton go to: https://pypi.org/project/sphinx-copybutton/
For sphinx-copybutton css go to:https://github.com/executablebooks/sphinx-copybutton/blob/master/sphinx_copybutton/_static/copybutton.css
For sphinx-design go to: https://pypi.org/project/sphinx_design/
For sphinx-togglebutton go to: https://pypi.org/project/sphinx-togglebutton/
3.3. Dependenciesο
pip install Sphinx==7.2.6
pip install sphinx-copybutton==0.5.2
pip install sphinx-rtd-theme==1.3.0
pip install sphinx-togglebutton==0.3.2
pip install sphinx_design==0.5.0
3.4. All pip installed versionsο
Check the installed version of sphinx, sphinx_rtd_theme and sphinx-copybutton with:
pip list
3.5. Install Sphinxο
Press Win + X + C to open the Command prompt.
From the cmd prompt install the Sphinx library.
pip install sphinx==7.2.6
To upgrade include the
-U
flag.
pip install -U sphinx==7.2.6
Check the installed version with:
sphinx-build --version
3.6. Install the Sphinx theme for Read the Docsο
The sphinx_rtd_theme is used by other RTD guides, so it is best to use for consistency of look and feel.
From the cmd prompt install the Sphinx theme for read the docs.
pip install sphinx_rtd_theme
To upgrade include the
-U
flag.
pip install -U sphinx_rtd_theme
To use
sphinx_rtd_theme
, make the changes to the conf.py file that are detailed at VSCode conf.py file.
3.9. Install the sphinx_design Extensionο
The sphinx_design Extension adds drop downs and tabs:
pip install sphinx_design
To upgrade include the
-U
flag:
pip install -U sphinx_design
To use
sphinx_design
, make the changes to the conf.py file that are detailed at VSCode conf.py file.