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