Wiki Editing - Setting Up the Environment

Before submitting large changes to the wiki it is best to check the pages are rendered correctly including checking all images and links appear correctly. This page explains how to “build” the wiki (i.e. convert the rst files and image files into a set of html pages) on your local machine so that you can perform these checks.

There are several methods to setup a local build environment:

  1. Use the Vagrantfile in the root of the repo to create a Linux virtual machine with all the necessary packages installed. This is the preferred and supported method.
  2. Use the Dockerfile in the root of the repo to create a Linux container with all the necessary packages installed.
  3. Or simply install Sphinx on your local Linux machine, or under WSL in Windows (Win8 may need to add this component ).

Fork, Clone, and Update Your Copy of the Wiki

First, the wiki should be forked and cloned much like developers do for the flight code.

  • Create a Github account if you do not have one already

  • Install a Git Client

  • Fork the ardupilot_wiki to create your own copy in GitHub (note linked instructions are for the ardupilot flight code so “ardupilot” should be replaced with “ardupilot_wiki”)

  • Clone your copy of ardupilot_wiki on GitHub to your local machine (note linked instructions are for the ardupilot flight code so “ardupilot” should be replaced with “ardupilot_wiki”)

    git clone

Be sure to keep your fork of the repository updated, both locally, and on GitHub both as you install and as you develop new contributions. Be sure to create a working branch locally when you start to make changes, pushing that branch up to your GitHub repo, and then making a PR (pull-request from there to the Wiki repo), in a manner similar to making code PRs.

git remote add upstream
git checkout master
git fetch upstream
git rebase upstream/master
git push -f origin master

Setup in Linux or Windows WSL

Run the following command from the ardupilot_wiki directory you cloned:


Then jump down to “Build the wiki”.

Setup with Vagrant

  1. Download and install Vagrant
  2. Download and install Oracle VirtualBox.
  3. Windows users should install an SSH client on the computer before starting vagrant. Vagrant needs SSH client program to access development container. We have had great success with OpenSSH packer from MLS-Software here

The main steps for building the docs are:

  1. Open a command prompt in the root of the ardupilot_wiki repo, and start Vagrant. The first time this is run it may take over 30 minutes to complete.

    cd ardupilot_wiki
    vagrant up
  2. SSH into Vagrant (Windows users may need to add SSH to your PATH)

    vagrant ssh
  3. Navigate in the SSH shell to the /vagrant directory and start the build.

    cd /vagrant

Build the Wiki

As shown in the last step of the vagrant instructions above, use to build some or all of the wiki. You may need to prefix the python commands below with “sudo”, especially when rebuilding.

python --site copter  (to build just the copter wiki)
python --site plane   (to build just the plane wiki)
python --site rover   (to build just the rover wiki)
python --site dev     (to build just this developer wiki)

The script will copy the common files into each wiki subdirectory and then build each wiki.


The script will show the build output of each of the wikis. This should be inspected for warnings and errors. The script does some file copying at the end, which will fail and can be ignored (this is used when publishing the docs)

Check the Results

With your favourite web browser, open the locally built wiki which should be near where the ardupilot_wiki repo was cloned to

  • For Copter look for ardupilot_wiki/copter/build/html/index.html
  • For Plane look for ardupilot_wiki/plane/build/html/index.html
  • For Rover look for ardupilot_wiki/rover/build/html/index.html
  • For Developer look for ardupilot_wiki/dev/build/html/index.html

Setup with docker

  1. Download and install Docker according to their official documentation .

  2. Open a command prompt in the root of the ardupilot_wiki repo and build the docker container for the wiki:

    cd ardupilot_wiki
    docker build . -t ardupilot_wiki

This will build a docker image with all package setup to build the wiki and name it ardupilot_wiki.

  1. Use the container to build the wiki with a shared volume to get the build result on your computer:

    docker run --rm -it -v "${PWD}:/ardupilot_wiki" -u "$(id -u):$(id -g)" ardupilot_wiki python3

That will build the wiki with the similary as in Build the Wiki. The -v is used to share the content of the current directory, that hold all the documentation, to the container. The -u is used to make docker use the same permission as your current user. With those two command the resulting build is accessible as in Check the Results

RST editing/previewing

The tools described in this section can make it easier to edit RST files and reduce the time required to preview changes.


The RST rendering tools can be useful for rapidly previewing small changes in the documentation. Rendering will not be perfect because the tools are designed for generic reStructuredText (they and are not “Sphinx-aware). We therefore recommend that you build with Sphinx to do a final review before you make a documentation pull request.

RST rendering on Windows

A combination of two Windows tools can help you previewing your modifications:

The Notepad++ plugin helps you with code completion and syntax highlighting during modification. Restview renders RST files on-the-fly, i.e. each modification on the RST file can be immediately visualized in your web browser.

The installation of the Notepad++ plugin is clearly explained on the plugin’s website (see above).

Restview can be installed with:

python -m pip install restview

The restview executable will be installed in the Scripts folder of the Python main folder. Restview will start the on-the-fly HTML rendering and open a tab page in your preferred web browser.


If you are in the root folder of your local Wiki repository:

start \python-folder\Scripts\restview common\source\docs\common-wiki_editing_guide.rst

RST rendering on Linux

  • ReText is a Linux tool that provides syntax highlighting and basic on-the-fly rendering in a single application.


Although the tool is Python based, don’t try it on Windows as it very prone to crashes (this is also stated by the website).