blob: 188b42e885bfa5b32108ffea2aa274c93066df50 [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
16Sphinx requires Python, which is already installed if you are running OS X.
17You 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
19installed. If you're not on 2.7+, go ahead and install 2.7.2 from
20http://python.org/download/releases/2.7.2/
21
22Installation
23============
24
251. Install `easy_install <http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install>`_
James L Parryb4214c72014-10-26 22:50:42 -0700262. ``easy_install "sphinx==1.2.3"``
Derek Jones8ede1a22011-10-05 13:34:52 -0500273. ``easy_install sphinxcontrib-phpdomain``
284. Install the CI Lexer which allows PHP, HTML, CSS, and JavaScript syntax highlighting in code examples (see *cilexer/README*)
295. ``cd user_guide_src``
306. ``make html``
31
32Editing and Creating Documentation
33==================================
34
35All of the source files exist under *source/* and is where you will add new
36documentation or modify existing documentation. Just as with code changes,
37we recommend working from feature branches and making pull requests to
38the *develop* branch of this repo.
39
40So where's the HTML?
41====================
42
43Obviously, the HTML documentation is what we care most about, as it is the
44primary documentation that our users encounter. Since revisions to the built
45files are not of value, they are not under source control. This also allows
46you to regenerate as necessary if you want to "preview" your work. Generating
47the HTML is very simple. From the root directory of your user guide repo
48fork issue the command you used at the end of the installation instructions::
49
50 make html
51
52You will see it do a whiz-bang compilation, at which point the fully rendered
53user guide and images will be in *build/html/*. After the HTML has been built,
54each successive build will only rebuild files that have changed, saving
55considerable time. If for any reason you want to "reset" your build files,
56simply delete the *build* folder's contents and rebuild.
57
58***************
59Style Guideline
60***************
61
62Please refer to source/documentation/index.rst for general guidelines for
63using Sphinx to document CodeIgniter.