.. _documentation-guide:
+###################
Documentation Guide
-===================
+###################
This guide provides details on how to contribute to the OpenDaylight
documentation. OpenDaylight currently uses a mix of AsciiDoc_ and
people.
reStructuredText-based Documentation
-------------------------------------
+====================================
When using reStructuredText, we try to follow the python documentation
style guide. See:
firefox docs/_build/html/index.html
Directory Structure
-^^^^^^^^^^^^^^^^^^^
+-------------------
The directory structure for the reStructuredText documentation is
rooted in the ``docs`` directory inside the ``docs`` ``git``
.. note:: When including rst files using ``toctree`` omit the .rst at
the end of the file name.
+Documentation Layout and Style
+------------------------------
+
+As mentioned previously we try to follow the python documentation style guide
+which defines a few types of sections::
+
+ # with overline, for parts
+ * with overline, for chapters
+ =, for sections
+ -, for subsections
+ ^, for subsubsections
+ ", for paragraphs
+
+We try to follow the following structure based on that recommendation::
+
+ docs/index.rst -> entry point
+ docs/____-guide/index.rst -> part
+ docs/____-guide/<chapter>.rst -> chapter
+
+In the ____-guide/index.rst we use the # with overline at the very top
+of the file to determine that it is a part and then within each chapter
+file we start the document with a section using * with overline to
+denote that it's the chapter heading and then everything in the rest of
+the chapter should use::
+
+ =, for sections
+ -, for subsections
+ ^, for subsubsections
+ ", for paragraphs
+
+
Troubleshooting
-^^^^^^^^^^^^^^^
+---------------
If you see an error like this::
They can be ignored. This is an artifact of our building documentation for the robot test framework customizations OpenDaylight has and is being tracked as `BUG-6159 <https://bugs.opendaylight.org/show_bug.cgi?id=6159>`_. More information can be found there.
AsciiDoc-based Documentation
-----------------------------
+============================
Information on the AsciiDoc tools and build system can be found here:
https://wiki.opendaylight.org/view/Documentation/Tools
Directory Structure
-^^^^^^^^^^^^^^^^^^^
+-------------------
The AsciiDoc documentation is all located in the ``manuals`` directory
of the ``docs`` ``git`` repository. An example of the directory
``src/main/resources`` directory containing images.
Migration from AsciiDoc to ReStructuredText
--------------------------------------------
+===========================================
Automatically
-^^^^^^^^^^^^^
+-------------
In theory, Pandoc_ can convert from DocBook to reStructuredText and we
produce DocBook as part of our build chain from AsciiDoctor. In
well.
By Hand
-^^^^^^^
+-------
Converting from AsciiDoc to reStructuredText is usually pretty
straightforward and involves looking up the basic syntax for what you
the HTML documentation rapid iteration is very easy.
Bold/Italics/Verbatim Formatting
-""""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is mostly minor syntax issues. In AsciiDoc you do inline
formatting something like this::
**bold** *italic* ``verbatim``
Images
-""""""
+^^^^^^
Image formats change from something like::