- First install sphinx
pip install Sphinx
- We use mobile friendly sphinx_rtd_theme style theme available here https://github.com/rtfd/sphinx_rtd_theme. Run the command below:
cd docs && pip install -r requirements.txt
- Edit the document under
docs/source/
. If you are adding a new doc, make sure to modify toctree insource/index.rst
. For syntax about.rst
, this link might be helpful http://www.sphinx-doc.org/en/stable/rest.html. If you have written markdown before, it should be easy to write.rst
files as well.
TIP: All the sphinx based documentations have a link View Page Source
on top right. You can click that link to see the corresponding .rst
file for that page.
- Run
cd docs && make html
-
Now you can see the generated html
index.html
underbuild/html/
-
Send PR
- Install Doxygen
Run the command
$ apt-get install doxygen
-
Edit the
docs/doxygen/index.md
file for making changes to the main page for doxygen docs. -
Edit the
docs/doxygen/Doxyfile
file for making change to what code should be documented, excluded etc. -
Now, test the docs locally. Run the following commands:
$ cd $HOME/TensorComprehensions && mkdir -p $HOME/TensorComprehensions-docs/api
$ doxygen docs/doxygen/Doxyfile
This will generate an html
folder which will contain all the html files for the
documentation. Please DO NOT
edit the html
folder manually. Rather make changes
as suggested in Step 2, 3 and re-generate docs.
-
Check the HTML docs look fine to you.
-
Send a PR