blob: b31db7cf8a9b2a9488dcd33d7d2b2703fd7de60c [file] [log] [blame]
Derek Jones8ede1a22011-10-05 13:34:52 -05001######################
2CodeIgniter User Guide
3######################
4
5******************
6Setup Instructions
7******************
8
9The CodeIgniter user guide uses Sphinx to manage the documentation and
10output it to various formats. Pages are written in human-readable
11`ReStructured Text <http://sphinx.pocoo.org/rest.html>`_ format.
12
13Prerequisites
14=============
15
Andrey Andreev2f473192017-07-21 11:59:51 +030016Sphinx requires Python 2.7. If you are on OS X, then you already have Python.
Derek Jones8ede1a22011-10-05 13:34:52 -050017You can confirm in a Terminal window by executing the ``python`` command
18without any parameters. It should load up and tell you which version you have
Andrey Andreev2f473192017-07-21 11:59:51 +030019installed.
20
21Note: If you're not on Python 2.7, then you must upgrade. E.g. Install 2.7.2
22from http://python.org/download/releases/2.7.2/
Derek Jones8ede1a22011-10-05 13:34:52 -050023
24Installation
25============
26
271. Install `easy_install <http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install>`_
Andrey Andreev2f473192017-07-21 11:59:51 +0300282. ``easy_install "sphinx==1.6.3"``
Andrey Andreev7622ec62016-11-21 11:56:21 +0200293. ``easy_install "sphinxcontrib-phpdomain==0.1.3.post1"``
Derek Jones8ede1a22011-10-05 13:34:52 -0500304. Install the CI Lexer which allows PHP, HTML, CSS, and JavaScript syntax highlighting in code examples (see *cilexer/README*)
315. ``cd user_guide_src``
326. ``make html``
33
34Editing and Creating Documentation
35==================================
36
37All of the source files exist under *source/* and is where you will add new
38documentation or modify existing documentation. Just as with code changes,
39we recommend working from feature branches and making pull requests to
40the *develop* branch of this repo.
41
42So where's the HTML?
43====================
44
45Obviously, the HTML documentation is what we care most about, as it is the
46primary documentation that our users encounter. Since revisions to the built
47files are not of value, they are not under source control. This also allows
48you to regenerate as necessary if you want to "preview" your work. Generating
49the HTML is very simple. From the root directory of your user guide repo
50fork issue the command you used at the end of the installation instructions::
51
52 make html
53
54You will see it do a whiz-bang compilation, at which point the fully rendered
55user guide and images will be in *build/html/*. After the HTML has been built,
56each successive build will only rebuild files that have changed, saving
57considerable time. If for any reason you want to "reset" your build files,
58simply delete the *build* folder's contents and rebuild.
59
60***************
61Style Guideline
62***************
63
64Please refer to source/documentation/index.rst for general guidelines for
Andrey Andreev7622ec62016-11-21 11:56:21 +020065using Sphinx to document CodeIgniter.