Building the documentation with Sphinx

This page explains how to build a local copy of the Scorpion documentation using the Sphinx docs engine. This allows you to have local HTML files and build the documentation as a PDF, EPUB, or LaTeX file, for example.

Before you get started, make sure that you have:

Note

Python 3 should come with the pip3 command. You may need to write python3 -m pip (Unix) or py -m pip (Windows) instead of pip3. If both approaches fail, make sure that you have pip3 installed.

  1. Clone the docs repo:

    git clone https://github.com/scorpionantimalware/sam-docs.git
    

Note

You can add the –depth 1 argument to omit the commit history. Faster, but not all Git operations (like blame) will work.

  1. Change directory into the docs repo:

    cd sam-docs/
    
  2. Build the docs:

    make html
    

    Note

    On Windows, that command will run make.bat instead of GNU Make (or an alternative).

    Alternatively, you can build the documentation by running the sphinx-build program manually:

    sphinx-build -M html . _build/
    

You can then browse the documentation by opening _build/html/index.html in your web browser.