documentation.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .. raw:: html
  2. <div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/documentation.rst">Edit me on GitHub</a></div>
  3. =====================
  4. Writing Documentation
  5. =====================
  6. .. note:: Contributions to the documentation are much appreciated.
  7. What is used to write the documentation?
  8. ========================================
  9. This documentation is written in `Sphinx <http://sphinx-doc.org/>`_, a
  10. documentation generator written in `Python <http://python.org>`_.
  11. The documentation is written in `reStructuredText (reST) <http://sphinx-doc.org/rest.html>`_,
  12. a very easy to write plain text format, relatively similar to Markdown.
  13. So see what the source looks like, click the **Source** link in the footer of
  14. this page.
  15. Where is the documentation?
  16. ===========================
  17. The reST documentation files are located in the
  18. `converse.js code repository <https://github.com/jcbrand/converse.js/tree/master/docs/source>`_
  19. under ``docs/source``.
  20. How to generate HTML from the source files?
  21. ===========================================
  22. Generate the HTML
  23. -----------------
  24. After installing the dependencies, you can generate the HTML by running::
  25. make html
  26. The HTMl files will be located in ``./docs/html``
  27. What ``make html`` does for you is it installs `zc.buildout <http://www.buildout.org/en/latest/>`_
  28. which is used to install Sphinx and all its dependencies.
  29. You'll need to have Python and `Virtualenv <https://virtualenv.pypa.io/en/latest/>`_ available on your computer.
  30. .. warning:: When contributing, please don't commit any generated html files.
  31. Serving the documentation
  32. -------------------------
  33. To view the generated docs, you can run ``make serve`` and then open
  34. http://localhost:8000/docs/html/index.html in your browser.