ligo/docs
Raphaël Proust 771f937792 Doc: typo fixes
Note: this is only fixing typos highlighted by a spellchecker. More
typos and errors probably still lurk.
2018-05-10 12:46:16 +08:00
..
_extensions Docs: add more sphinx :labels: 2018-02-20 22:40:42 +00:00
api Docs: add online help pages for the client 2018-01-31 14:51:56 +00:00
doc_gen Fix: rpc json schema output would in some cases not be generated 2018-04-13 17:01:37 +00:00
introduction Doc: typo fixes 2018-05-10 12:46:16 +08:00
tutorials Doc: typo fixes 2018-05-10 12:46:16 +08:00
whitedoc Doc: typo fixes 2018-05-10 12:46:16 +08:00
conf.py Fix: sphinx warning about bad reference 2018-03-26 01:04:07 +02:00
index.rst Doc: fixed typo s/developper/developer/ 2018-04-18 14:21:42 +02:00
logo.svg Docs: new documentation structure using Sphinx/RST 2018-01-23 08:02:17 +01:00
Makefile Docs: normalize and prettify both errors and rpc documentation 2018-03-26 01:04:07 +02:00
README.rst Doc: typo fixes 2018-05-10 12:46:16 +08:00

******************************
Building documentation locally
******************************

The documentation is available online at `doc.tzalpha.net <http://doc.tzalpha.net/>`_,
always up to date with master on `Gitlab <https://gitlab.com/tezos/tezos>`_.

Building instructions
---------------------

To build the documentation, you can use the main Makefile target ``doc-html``

.. code:: bash

    make doc-html

The documentation is built by Sphinx, and uses the Read The Docs theme.

On a debian system, you can install the needed dependencies with:

.. code:: bash

    sudo apt install \
      python3-recommonmark \
      python3-sphinx \
      python3-sphinx-rtd-theme

Sphinx extensions
-----------------

Some ad-hoc reference kinds are supported.

- ``:package-src:`name``` or ``:package-src:`text<name>``` points
  to the gitlab source tree viewer where the `.opam` for the package
  is located
- ``:package:`name``` or ``:package:`text<name>``` now points
  either to the `odoc` page, or if it doesn't exist, to the gitlab
  source tree viewer
- ``:package-name:`name``` or ``:package-name:`text<name>``` just
  displays the package name (no link), checking that the package
  exists
- ``:src:`/path/to/file/or/dir``` or
  ``:src:`text</path/to/file/or/dir>``` points to the gitlab source
  tree viewer
- ``:opam:`package``` or ``:opam:`text<package>``` points to the
  package page on ``opam.ocaml.org``, version number is supported
  (``package.version``)

OCaml documentation
-------------------

Odoc is used for OCaml API generation, that you can install with:

.. code:: bash

    opam install odoc

Tezos generates the API documentation for all libraries in HTML format.  The
generated HTML pages in ``_build/<context>/_doc``. It creates one sub-directory
per public library and generates an ``index.html`` file in each sub-directory.

The documentation is not installed on the system by Tezos. It is meant to be
read locally while developing and then published on the www when releasing
packages.