Auto generate documentation using Sphinx (anybody else interested in joint documentation effort? )

  1. install sphinx
    apt-get install python-sphinx

  2. to quickstart, go to docs/ directory and:
    sphinx-quickstart
    the yes and nos should be pretty darn straightforward.

  3. create rst files in docs/source directory
    sphinx-apidoc -e -f -o source/ ../fastai
    this create rst files, one rst for each module
    -f: force overwirte existing documentations
    -e: seperate (or you’ll get one giant rst file, which turns into one giant html file )
    -o: outputdir

  4. go to docs/source/conf.py, and add following lines:
    import os
    import sys
    sys.path.insert(0, os.path.abspath(’…/…’))

  5. to create html under docs/build/html directory:
    make html

now you should see deployable html documentation.

Just open docs/build/html/index.html and enjoy!

5 Likes

Another thought of documentation is using sphinx to generate markdown (.md) files and organize them with mkdocs, but please somebody tell me if it’s an noble effort or waste of time.

@YangL Are you still interested in the project? There are a few more other people, I myself included, who want to work on the same thing.