Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby equivalent of Sphinx documentation generator?

Ruby has a few good document generators like Yard, rDoc, even Glyph. The thing is that Sphinx does websites, PDF's, epub, LaTex...etc. It does all these things in restructuredtext.

Is there an alternative to this in the Ruby world? Maybe a combination of programs? If I could use Markdown as well that would be even better.

like image 916
user1026169 Avatar asked Feb 21 '12 04:02

user1026169


People also ask

What is Sphinxcontrib?

Sphinx is a powerful documentation generator that has many great features for writing technical documentation including: Generate web pages, printable PDFs, documents for e-readers (ePub), and more all from the same sources. You can use reStructuredText or Markdown to write documentation.

Is Sphinx only for Python?

This line of thinking makes sense, because Sphinx was created to document Python itself. Sphinx however, is a generic documentation tool that is capable of documenting any software project. The goal of Sphinx is to help you write prose documentation. Prose docs work great for any kind of software you are documenting.

What is Sphinx rst?

RST stands for ReStructured Text. It is the standard markup language used for documenting python packages. Sphinx is the Python package that generates an html website from RST files, and it is what we are using to generate this site.


2 Answers

Since version 1.0, Sphinx has had a concept of "domains" which are ways of marking up code entities (like method calls, objects, functions, whatever) from lannguages other than Python and/or C.

There is a ruby domain, so you could just use Sphinx itself. The only thing you would be missing (I think) is Sphinx's ability to create documentation from source automatically using the autodoc extension, which works specifically on Python code.

like image 127
Kevin Horn Avatar answered Sep 18 '22 22:09

Kevin Horn


If you want to use Markdown, you might check out JDoc, which is a very simple, Ruby-based documentation framework that lets you use widely-supported markup and put it under source control. It lets you edit the documentation in your text editor of choice, and it supports:

  • Markdown or Textile
  • syntax highlighting
  • easy internal links
  • a hierarchical documentation structure (useful for large projects)
  • customizable styling and structure (but it looks nice out of the box, too)

It generates static HTML, so the resulting documentation is easy to host and doesn't have much of an impact on your server load.

To see it in action, check out wpmvc.org.

like image 21
Tom Avatar answered Sep 21 '22 22:09

Tom