rtd.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Using ReadTheDocs
  2. =================
  3. .. note::
  4. For Tripal's own ReadTheDocs guidelines: :ref:`tripal_rtd`.
  5. What is ReadTheDocs?
  6. --------------------
  7. Documentation is important. It tells users how to use our product, and developers how to read our code. We recommend hosting documentation for your custom module somewhere easily accessible, like ReadTheDocs.
  8. `ReadTheDocs <https://readthedocs.org/>`_ (RTD) uses the `Sphinx <http://www.sphinx-doc.org/en/master/>`_ framework to build a website in a Continuous Integration setup. Your RTD-compatible documentation is added directly to your module and when code changes are pushed to GitHub, the documentation website as defined by sphinx is built, and the "live" documentation website is updated.
  9. Benefits to housing documentation inside of your module code are:
  10. - Code changes can include documentation updates **in the same pull request**.
  11. - Changes to the documentation is **subject to review, just like code changes**.
  12. - Documentation changes are under **version control**.
  13. How do I add ReadTheDocs to my project?
  14. ---------------------------------------
  15. Below is a quick overview of steps for integrating your module's documentation with RTD:
  16. - Set up your ReadTheDocs account and import your project.
  17. - Install Sphinx.
  18. - Create a ``docs`` folder at the root of your project and navigate into it.
  19. - Run the quickstart command: ``sphinx-quickstart``.
  20. - This creates necessary site configuration files (``conf.py``) as well as the make script to build your site.
  21. - Write your documentation (we're using reStructuredText (RST) format):
  22. - Create an ``index.rst`` as the home page.
  23. - Link other RST documents in your ``index.rst``.
  24. - Once the guide is on your master branch on GitHub, ReadTheDocs will handle the rest!
  25. For a detailed walkthrough, please see the `official ReadTheDocs getting started guide <https://docs.readthedocs.io/en/latest/getting_started.html>`_.
  26. For RTD integration we recommend using reStructuredText (RST) to write your documentation. It might seem a little more complicated than markdown (and it is), but it's also more powerful. The choice is yours for which format to use.
  27. ReadTheDocs also provides **versioning** tools, allowing you to post releases of the documentation so users can go back and find older documentation with almost no effort on your part.
  28. What should my documentation include?
  29. -------------------------------------
  30. We suggest that your module include the following sections:
  31. - Overview
  32. - Installation and Setup Guide
  33. - User's Manual
  34. The Overview section should describe what features your module offers.
  35. The Installation and setup section should guide a site administrator through installing and setting up your module. Any site-wide settings that need to be configured, environmental variables set, or anything else not handled by the automated Drupal install should be covered.
  36. The User's guide should walk through the day-to-day usage of your module. This may include using custom importers, dashboards, or simply summaries of the new content this module provides.