documentation.rst 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Contributing to the Documentation
  2. ==================================
  3. The Tripal documentation is written in `**Restructured Text** <http://docutils.sourceforge.net/rst.html>`_, compiled with `Sphinx <http://www.sphinx-doc.org/en/master/usage/quickstart.html>`_, and built/hosted with `ReadTheDocs <https://readthedocs.org/>`_. The ``docs`` directory, when compiled, is hosted at https://tripal.readthedocs.io/en/latest/.
  4. For minor changes, you can simply `Edit the file using the Github editor <https://help.github.com/articles/editing-files-in-your-repository/>`_, which will allow you to make a Pull Request. Once approved, your changes will be reflected in the documentation automatically!
  5. Guide
  6. ------
  7. Install Sphinx
  8. ~~~~~~~~~~~~~~~~~
  9. For minor changes, you don't need to build the documentation! If you want to see how your changes will look on the built site, however, you will need Sphinx installed.
  10. For more information, please see the Sphinx setup guide:
  11. http://www.sphinx-doc.org/en/master/usage/quickstart.html
  12. Building your changes
  13. ~~~~~~~~~~~~~~~~~~~~~~~
  14. For more extensive edits, or when contributing new guides, you should build the documentation locally. From the ``docs`` root (eg ``/var/www/html/sites/all/modules/tripal/docs/``, execute ``make html``. The built site will be in ``docs/_build/html/index.html``.
  15. Tripal conventions
  16. ~~~~~~~~~~~~~~~~~~~~~~~
  17. Please follow these guidelines when updating our docs. Let us know if you have any questions or something isn't clear.
  18. Please place images in the same folder as the guide text file, following the convention [file_name].[n].[optional description].[extension]. For example, ``configuring_page_display.3.rearrange.png`` or ``configuring_page_display.1.png`` are both located in ``docs/user_guide/`` and are part of the ``configuring_page_display.rst`` guide.
  19. We currently use the following syntax:
  20. .. code-block:: rst
  21. Title of File (using title case)
  22. =================================
  23. Introduction text.
  24. Section Title
  25. -------------
  26. We use double backticks to indicate ``inline-code`` including file names, function and method names, paths, etc.
  27. Longer code-blocks should begin with the ``.. code-block:: [type]`` directive and should be indented at least one
  28. level. There should also be a blank line before and after it as shown below.
  29. .. code-block:: sql
  30. if ($needs_documentation) {
  31. use $these_guidelines;
  32. $contribute_docs = $appreciated;
  33. }
  34. Section 1.1 Title
  35. ^^^^^^^^^^^^^^^^^
  36. The use of appropriate sections makes reading documentation and later specific details easier. Sub sections such
  37. as this one will be hidden unless the main section is already selected.
  38. ```