============
 GeoExtSite
============

Dependencies
------------

 * python2.5

 * python development headers. On Debian-like systems::

    you@propmpt:~/$ sudo apt-get install python2.5-dev 

 * SQLite3 development files. On Debian-like systems::

    you@propmpt:~/$ sudo apt-get install libsqlite3-dev


Getting the website utilities
-----------------------------

::

    you@prompt:~/$ svn co http://svn.geoext.org/website GeoExtSite


Basic self contained install from source
----------------------------------------

Basic self contained install from source::

::

    you@prompt:~/$ cd GeoExtSite
    you@prompt:~/GeoExtSite$ python2.5 setup_website

This will make the directory GeoExtSite into a contained development
enviroment. For convenience, you can "activate" this environment and
put the directory ~/GeoExtSite on the path::

    you@prompt:~/GeoExtSite$ . bin/activate
    (GeoExtSite):~/GeoExtSite$ echo $PATH
    /Users/you/GeoExtSite/bin:...  

Important note, before running any of the commands below, and whenever returning
to this directory to repeat any of the paver commands, make sure to activate
your virtual environment.

    you@prompt:~/GeoExtSite$ . bin/activate
    (GeoExtSite):~/GeoExtSite$

To deactivate *(do not deactivate before running paver commands below)*, run the
``deactivate`` command.


Paver
-----

Paver is a general purpose build scripting tool that lets you add arbitrary
commands that may depend on other arbitrary commands inside a
pavement file.  Use help to see what commands are available::

   (GeoExtSite)you@prompt:~/GeoExtSite$ paver help


Building the Docs
-----------------

From the GeoExtSite directory, run the following to build the html docs::

    (GeoExtSite)you@prompt:~/GeoExtSite$ paver build_docs

This will export the latest GeoExt code and doc sources.  You can rebuild the
docs at any time with the above command.  If you need to grab an update from the
repository before building docs, run the following::

    (GeoExtSite)you@prompt:~/GeoExtSite$ paver export_src
    (GeoExtSite)you@prompt:~/GeoExtSite$ paver build_docs

To build docs for a specific release, make sure the release is configured in
the [releases] section of website-conf.cfg (e.g. "latest" for the latest stable
release), and run the following:

    (GeoExtSite)you@prompt:~/GeoExtSite$ paver release=latest export_src
    (GeoExtSite)you@prompt:~/GeoExtSite$ paver build_docs


Serving Website
---------------

The paver tasks above build a static website with html and associated resources.
You can view this site in a browser by navigating to the www directory in the
GeoExtSite directory.  If you don't have a web server running, you can still
view the docs in any browser (e.g. file:///path/to/GeoExtSite/www/index.html).

If you have a web server running that has access to the GeoExtSite directory,
you can browse the built docs (e.g. http://localhost/path/to/GeoExtSite/www/index.html).

If you don't have a web server running that can access the docs, you can run
one from the website environment::

    (GeoExtSite)you@prompt:~/GeoExtSite$ bin/paster serve etc/dev.ini http_port=8080

Then surf to :

   http://localhost:8080/
   http://localhost:8080/trac



Summary of the GeoExtSite directory layout
==========================================

GeoExtSite/
-----------

All utilities for building the website. Activate this virtualenv (``.
bin/activate``) before running any paver tasks (e.g. ``paver build_docs``).


GeoExtSite/www/
---------------

A built version of the site. Only exists after ``paver build_docs``. Contains
copies of the static resources (images and stylesheets) in the docsrc directory
mentioned below.


GeoExtSite/src/trunk/geoext/
----------------------------

The GeoExt lib and other resources. This is used to generate API docs from the
js source. Only exists after ``paver build_docs``.


GeoExtSite/src/trunk/docsrc/
----------------------------

Contains all rst, stylesheets, images, and templates. This is where things can
be edited to change the look of the website. Also contains config for sphinx.
Only exists after ``paver build_docs``.

To change the look of the website, you would edit things in this directory (e.g.
_static/geoext.css) and then rerun ``paver build_docs``.

