1
.. _documentation-label:
3
Contributing Documentation
4
==========================
6
Our documentation is written using
7
`Sphinx Documentation Generator <http://sphinx.pocoo.org/>`_
8
which uses the `reStructuredText <http://docutils.sf.net/rst.html>`_ format.
10
All our documentation is stored in the main source reposatory in the docs/
11
directory, and every merge into trunk triggers a rebuild of our
12
`documentation site <http://docs.drizzle.org/>`_.
17
We require a minimum of python-sphinx 0.6 to compile the documentation but not
18
all of it will build correctly in that version. For correct documentation
19
version 1.0 is required.
21
When building the documentation warnings are treated as errors, so the documentation
22
needs to be warning free in 1.0.
27
The documentation files have the .rst extension and are stored in the ``docs/``
33
To add a new document to the contents you will need to add it to a relevent
34
section in the ``docs/index.rst`` file.
39
To document plugins you need to create a ``docs/`` subdirectory in your plugin
40
directory containing an index.rst file. This will be automatically added during
41
the ``config/autorun.sh`` phase.
46
The documentation is in the reStructured text format which is a wiki-like markup
47
language ideal for documentation.
52
Headings take the form of just the text with a diffent style of underline to
53
signify the level, for example:
69
There are two ways of generating a table, the first is basically drawing the
70
entire table in ascii art as follows:
96
As an alternative there is a simplified form as follows:
120
In this form there must be more than one row to the table and the first column
121
can only have a single line.
126
Sphinx supports syntax highlighting using the `Pygments <http://pygments.org/>`_
127
engine. For example, with the *mysql* syntax highlighter you can do the
132
.. code-block:: mysql
134
SELECT * FROM t1 WHERE a=1;
138
.. code-block:: mysql
140
SELECT * FROM t1 WHERE a=1;
142
You can also add line numbers as follows:
153
printf("hello world");
165
printf("hello world");
170
`Pygments Demo <http://pygments.org/demo/>`_ - A demo of the available syntax
176
Footnotes in their most simple form can be generated using ``[1]_`` in the text
177
and then a section of the bottom of the page as follows [1]_:
181
.. rubric:: Footnotes
187
.. rubric:: Footnotes
191
Notes, Warnings, Todo and See Also
192
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194
Notes, warnings and todos all take similar forms:
229
* `Sphinx documentation <http://sphinx.pocoo.org/contents.html>`_
230
* `Openalea Sphinx Cheatsheet <http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html>`_
232
Building Documentation
233
----------------------
235
The documentation is compiled from the ``.rst`` files during ``make``, but to
236
create HTML files from this you will need to run ``make html``.
238
To see other possible formats run ``make sphinx-help``.
240
Committing Documentation
241
------------------------
243
Documentation needs to be committed and merged in exactly the same way as
244
regular development files. For more information on this please see the
245
:ref:`contributing code <code-label>` page.