ligo/docs
2019-02-26 12:07:03 +01:00
..
_extensions Docs: update links to generated odoc 2018-07-10 13:58:13 +00:00
api Doc: remove rpc_proposal, include p2p 2018-11-28 11:24:22 +01:00
doc_gen Doc: remove rpc_proposal, include p2p 2018-11-28 11:24:22 +01:00
introduction Make: add make build-dev-deps 2019-02-19 17:37:54 +01:00
protocols Doc: transactions use at least 10100 gas 2019-01-08 16:12:03 +00:00
tutorials Doc: remove rpc_proposal, include p2p 2018-11-28 11:24:22 +01:00
whitedoc Fix some typos in Michelson specifications 2019-02-26 12:07:03 +01:00
conf.py Doc: change copyright 2018-11-28 11:24:17 +01:00
index.rst Update index.rst 2019-02-01 05:23:59 +00:00
logo.svg Docs: new documentation structure using Sphinx/RST 2018-01-23 08:02:17 +01:00
Makefile Doc: remove unused readme.rst from makefile 2018-07-25 16:47:10 +02:00
README.rst Update README with new doc address and license 2018-07-06 18:18:41 +02:00

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

The documentation is available online at `tezos.gitlab.io <http://tezos.gitlab.io/master/>`_,
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.