rtd.rst 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. - Run the quickstart command: ``sphinx-quickstart``
  19. - Write your documentation (we're using reStructuredText (RST) format)
  20. - Create an ``index.rst`` as the home page
  21. ` Link other RST documents in your ``index.rst``
  22. - run ``make html`` in the docs folder to build your site for testing purposes. Sphinx will build you a searchable site with nicely formatted navigation.
  23. - Push your changes to GitHub
  24. For a detailed walkthrough, please see the `official ReadTheDocs getting started guide <https://docs.readthedocs.io/en/latest/getting_started.html>`_.
  25. 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.
  26. 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.
  27. What should my documentation include?
  28. -------------------------------------
  29. We suggest that your module include the following sections:
  30. - Overview
  31. - Installation and Setup Guide
  32. - User's Manual
  33. The Overview section should describe what features your module offers.
  34. 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.
  35. 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.