Installation

Python package

pip install pagegen

Or install into virtual environment.

$ mkdir pagegen_virtualenv
$ virtualenv pagegen_virtualenv
$ source pagegen_virtualenv/bin/activate
$ pip install pagegen

Test installation

Assuming bash shell, create directory for new site, initialise directory, setup site.conf and finally generate site.

$ mkdir my_site
$ cd my_site
$ <path to pagegen>/pagegen --init --pagegen-conf <path to pagegen.conf>
$ echo -e "base_url=file://$PWD/site" > site.conf
$ <path to pagegen>/pagegen --generate

Warning

Python does not seem to detect locale on Mac OS X, returning a ValueError, 'unknown locale'. Try running pagegen command as LC_ALL=en_US.UTF-8 pagegen ... To make permanent add export LC_ALL=en_US.UTF-8 to ~/.profile

Open my_site/site/index.html in a browser to view (typically File > Open).

Alternatively test with a web server, this example uses the Python SimpleHTTPServer.

$ mkdir my_site
$ cd my_site
$ pagegen --init
$ echo -e "base_url=http://localhost:8000" > site.conf
$ pagegen --generate
$ cd site/production
$ python -m SimpleHTTPServer

Open http://localhost:8000 in a browser to view.