Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Python's website generate its online documentation?

Created using Sphinx 0.6.5.

I know Python's documentation uses reStructuredText, but it has different sections like http://docs.python.org/whatsnew/2.6.html and http://docs.python.org/tutorial/index.html.

How do you do this in reStructuredText? Do you run rst2html in a bunch of directories, keeping its structure?

I know that it uses Sphinx (not rst2html directly as said by Thomas Wouters in an answer), but how you should organize your rst structure with source code files in a repository so you have a full blown automated doc website?

like image 786
Somebody still uses you MS-DOS Avatar asked May 18 '10 11:05

Somebody still uses you MS-DOS


People also ask

Does Python have official documentation?

Docs. Documentation for Python's standard library, along with tutorials and guides, are available online.


3 Answers

The Python documentation uses reST for its markup, but it generates the HTML using sphinx, not rst2html directly. The sphinx tool is what converts all the individual .rst files into multiple .html files. To see how the Python docs are generated, see http://svn.python.org/projects/python/trunk/Doc/Makefile

like image 120
Thomas Wouters Avatar answered Sep 20 '22 00:09

Thomas Wouters


I found the sampledoc tutorial on the matplotlib site quite useful to get started with Sphinx.

like image 40
Craig McQueen Avatar answered Sep 20 '22 00:09

Craig McQueen


Here is how to build Python documentation exactly.

like image 34
anatoly techtonik Avatar answered Sep 19 '22 00:09

anatoly techtonik