Skip to content

Instantly share code, notes, and snippets.

@rdoume
Created May 28, 2019 13:17
Show Gist options
  • Save rdoume/f84e02b8b105c6474bfeab9d45f3d9d5 to your computer and use it in GitHub Desktop.
Save rdoume/f84e02b8b105c6474bfeab9d45f3d9d5 to your computer and use it in GitHub Desktop.

Make Docs

You must ensure that there is a folder docs in your main folder. This folder docs must have:

  • a Makefile
  • a conf.py file
  • an index.rst file
  • 2 folders : _static and _template

If these files exist:

  • At the root folder sphinx-apidoc lib/ -o docs/ This will generate the .rst files described in your index.rst
  • Go in your docs folder and make htmlto generate docs, that will be put in the _build/html folder.
  • Open the index.html to see generated doc.

If these files do not exist:

If these files does not exist, you must run the following commands at the root path of your folder:

  • sphinx-quickstart and follow the guidelines. You must answer yes when asked to generate doc from docstring.
  • sphinx-apidoc lib/ -o docs/ This will generate the .rst files described in your index.rst
  • Go in your docs folder and make htmlto generate docs, that will be put in the _build/html folder.
  • Open the index.html to see generated doc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment