I recently decided to try out the Developer branch of CodeIgniter. I quickly discovered that the documentation that comes with CodeIgniter's source files needs to be "built" before it can be viewed as HTML. To do this requires the Sphinx documentation generator tool.

Install Sphinx Documentation Generator Tool

First, check to see if you have Python installed:

python --version

If you do not already have Python installed, you'll need to install it:

sudo apt-get install python2.7

Now, you'll need to install python set up tools, because we'll be using easy_install:

sudo apt-get install python-setuptools

Now, install sphinx and an extension for PHP language support:

sudo easy_install sphinx
sudo easy_install sphinxcontrib-phpdomain

Now, install the CodeIgniter Lexer to Pygments:

cd user_guide_src/cilexer
sudo python setup.py install

For additional info about this, or if you encounter any issues, see the README file contained within the user_guide_src/cilexer directory.

To confirm that the CodeIgniter Lexer was installed correctly to Pygments, try the following:

pygmentize -L

The following should appear somewhere in the output from the above command:

* ci, codeigniter:
    CodeIgniter (filenames *.html, *.css, *.php, *.xml, *.static)

In my terminal window the output was being clipped. If this happens to you, try outputting the results of the command to a file:

pygmentize -L > output.txt

You can then open the file in your preferred text editing program to easily view the full output.

Build the User Guide

Finally you are ready to build the User Guide from source:

make html

That's it! You should now be able to view the User Guide as HTML in your browser. The built HTML files should be located at user_guide_src/build/html. A good starting point would be the root index.html file:

build/html/index.html