How to edit documentation¶
We’re using Sphinx to document autodiff
. This page has instructions on how to add additional pages of documentation.
The file index.rst
is the source for the main landing page. While it’s in restructured text format, most of the documentation can be written in markdown (this page was written in markdown). To add a new page, all we need to do is create a new markdown file and tell index.rst
to include it in the main table of contents:
Create a new file in the
source
directory.Add that file’s relative path to the
toctree
inindex.rst
.. toctree:: :maxdepth: 2 :caption: Contents: introduction.md test-page/how-to-edit-documentation.md test-page/new-test-page.md api-doc/modules.rst
Once that’s done, run
make html
from thedocs
directory. Doing so will create/docs/source/html/
. Openingindex.html
in a browser will show a local copy of our documentation page. Our documentation site does the same thing every time we push code to github.
The markdown syntax Sphinx uses is slightly different than Jupyter’s. This test page has some examples of markdown that works.