This is the Mass Open Cloud documentation repository.
Documentation files are written in Markdown and are stored in the docs/source directory.
Major sections are defined in docs/source/index.rst in the toctree block:
.. toctree::
:maxdepth: 2
networking/index.rst
hardware/index.rst
To add a new section:
-
Create the corresponding directory as a subdirectory of
docs/source(e.g.,docs/source/mysection). -
Create an
index.rstfile in the new directory (so,docs/source/mysection/index.rst) that looks like this:My Section ========== .. toctree:: :maxdepth: 2 :glob: * -
Update the main
docs/source/index.rstto include your new section:.. toctree:: :maxdepth: 2 networking/index.rst hardware/index.rst mysection/index.rst
Create your document in an existing section directory. The document should start with a level 1 heading:
# This is my document
You can render the documentation locally by installing Sphinx and using the Makefile. These instructions are appropriate for Linux and MacOS users; if you are using Windows, please see the Windows README.
In order to build the documentation you will need a recent version of Python and the make utility.
Start in the top level of this repository.
-
Create and activate a Python virtual environment:
$ python -mvenv .venv $ . .venv/bin/activate -
Install the required software:
$ pip install -r requirements.txt -
Build the documentation using
make:$ make -C docs html
If you have already run the above steps and you have an existing .venv directory, you can skip the installation steps:
$ . .venv/bin/activate
$ make -C docs html
-
You can directly open the file
docs/build/html/index.htmlin your browser. Under Linux, this will probably work:$ xdg-open docs/build/html/index.htmlUnder MacOS, you can use the
opencommand:$ open docs/build/html/index.htmlAnd of course you can just use the "Open..." menu item in your browser.
-
You can start a simple http server and then point your browser at a local URL. To start a server on port 8000:
$ cd docs/build/html $ python -m http.server 8000Now point your browser at http://localhost:8000