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 and serve the site.

$ mkdir my_site
$ cd my_site
$ pagegen --init
$ pagegen --serve production

The above commands will generate the site and make it available to browse on localhost.

The --init argument creates an example site in the current directory. The default site.conf has one section called Production, when calling pagegen --serve or pagegen --generate it is required to specify the configuration section to use.

To just generate the site, use pagegen --generate <config section>, the generated site will be in the site/<config section> directory, all ready for uploading to a web server.

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