「ローカルでのドキュメンテーションの構築方法」を編集中
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
+ | |||
----- | ----- | ||
− | + | Building documentation locally ****************************** | |
− | + | The documenation is available online at <code>doc.tzalpha.net <http://doc.tzalpha.net/></code>'', always up to date with master on <code>Gitlab <https://gitlab.com/tezos/tezos></code>''. | |
− | == | + | == Building instructions == |
− | + | To build the documentation, you can use the main Makefile target <code>doc-html</code> | |
− | .. | + | .. code:: bash |
− | <pre> make doc-html </pre> | + | <pre>make doc-html</pre> |
− | + | 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 |
− | <pre> sudo apt install \ | + | <pre>sudo apt install \ |
− | + | python3-recommonmark \ | |
− | + | python3-sphinx \ | |
− | + | python3-sphinx-rtd-theme</pre> | |
− | == | + | == Sphinx extensions == |
− | + | Some ad-hoc reference kinds are supported. | |
− | * <code> | + | * <code>:package-src:`name``` or</code>:package-src:<code>text<name>``` points to the gitlab source tree viewer where the</code>.opam` for the package is located |
− | * <code> | + | * <code>:package:`name``` or</code>:package:<code>text<name>``` now points either to the</code>odoc` page, or if it doesn't exist, to the gitlab source tree viewer |
− | + | * <code>:package-name:`name``` or</code>:package-name:`text<name>``` just displays the package name (no link), checking that the package exists | |
− | + | * <code>:src:`/path/to/file/or/dir``` or</code>:src:`text</path/to/file/or/dir>``` points to the gitlab source tree viewer | |
− | + | * <code>:opam:`package``` or</code>:opam:`text<package>`<code>points to the package page on</code>opam.ocaml.org<code>, version number is supported (</code>package.version``) | |
− | == | + | == OCaml documentation == |
− | + | Odoc is used for OCaml API generation, that you can install with: | |
− | .. | + | .. code:: bash |
− | <pre> opam install odoc </pre> | + | <pre>opam install odoc</pre> |
− | + | Tezos generates the API documentation for all libraries in HTML format. The generated HTML pages in <code>_build/<context>/_doc</code>. It creates one sub-directory per public library and generates an <code>index.html</code> 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. |