Building the documentation

Building the documentation#

Editor documentation#

The editor documentation is written using Sphinx.

In the editor repository, run:

$ make docs_html

The documentation is written to a folder called build-docs, inside the editor folder.

To view the documentation, start a static file server here, on a different port to the editor:

$ cd editor/build-docs
$ python -m http.server 8004

And open http://localhost:8004.

Runtime JavaScript API documentation#

The API documentation for the Numbas runtime is built using jsdoc.

One way of installing jsdoc, assuming you have nodejs installed, is:

$ npm install -g jsdoc

Next, clone the repository containing the template files. If the compiler is in a directory numbas/compiler, then clone the template repository to numbas/numbas-jsdoc-template:

$ git clone https://github.com/numbas/numbas-jsdoc-template

To rebuild the API documentation, in the compiler directory run:

$ make docs

The documentation HTML is written to a folder called build-docs, inside the compiler folder.

To view the documentation, start a static file server here, on a different port to the editor:

$ cd compiler/build-docs
$ python -m http.server 8005

And open http://localhost:8005.