1
.. _documentation-label:
3
Contributing Documentation
4
==========================
6
Our documentation is written using `Sphinx Documentation Generator <http://sphinx.pocoo.org/>`_ which uses the `reStructuredText <http://docutils.sf.net/rst.html>`_ format.
8
All our documentation is stored in the main source reporistory in the docs/
9
directory, and every merge into trunk triggers a rebuild of our `documentation site <http://docs.drizzle.org/>`_.
14
We require a minimum of python-sphinx 0.6 to compile the documentation but not
15
all of it will build correctly in that version. For correct documentation
16
version 1.0 is required.
18
When building the documentation warnings become errors, so the documentation
19
needs to be warning free in 1.0.
24
The documentation files have the .rst extension and are stored in the ``docs/``
30
To add a new document to the contents you will need to add it to a relevent
31
section in the ``docs/index.rst`` file.
36
To document plugins you need to create a ``docs/`` subdirectory in your plugin
37
directory containing an index.rst file. This will be automatically added during
38
the ``config/autorun.sh`` phase.
43
The documentation is in the reStructured text format which is a wiki-like markup
44
laungauge ideal for documentation.
49
Headings take the form of just the text with a diffent style of underline to
50
signify the level, for example:
66
There are two ways of generating a table, the first is basically drawing the
67
entire table in ascii art as follows:
93
As an alternative there is a simplified form as follows:
117
In this form there must be more than one row to the table and the first column
118
can only have a single line.
123
Sphinx supports syntax highlighting using the `Pygments <http://pygments.org/>`_
124
engine. For example, with the *mysql* syntax highlighter you can do the
129
.. code-block:: mysql
131
SELECT * FROM t1 WHERE a=1;
135
.. code-block:: mysql
137
SELECT * FROM t1 WHERE a=1;
139
You can also add line numbers as follows:
150
printf("hello world");
162
printf("hello world");
167
`Pygments Demo <http://pygments.org/demo/>`_ - A demo of the available syntax
173
Footnotes in their most simple form can be generated using ``[1]_`` in the text
174
and then a section of the bottom of the page as follows [1]_:
178
.. rubric:: Footnotes
184
.. rubric:: Footnotes
188
Notes, Warnings, Todo and See Also
189
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191
Notes, warnings and todos all take similar forms:
226
* `Sphinx documentation <http://sphinx.pocoo.org/contents.html>`_
227
* `Openalea Sphinx Cheatsheet <http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html>`_
229
Building Documentation
230
----------------------
232
The documentation is compiled from the ``.rst`` files during ``make``, but to
233
create HTML files from this you will need to run ``make html``.
235
To see other possible formats run ``make sphinx-help``.
237
Committing Documentation
238
------------------------
240
Documentation needs to be committed and merged in exactly the same way as
241
regular development files. For more information on this please see the
242
:ref:`contributing code <code-label>` page.