Quick start


For in depth documentation please see User manual.

$ pip install pagegen

Can also be used in a virtual environment.

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

Create example site

First initialise a new Pagegen site directory. If using pagegen from a virtual environment, do this from that directory (pagegen_virtualenv in the example above).

$ mkdir my_site
$ cd my_site
$ pgn --init

The above creates an example pagegen framework of files and folders in the content directory.


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

Generate example site

We are now ready to generate the site. This will create the finished site in the my_site/site/production/ directory. The production environment comes from the config section name in site.conf.

$ pgn --generate production

The my_site/site/production directory now contains a freshly generated site ready for upload to a web server.

When developing Pagegen can serve site locally and monitor files for changes, automatically triggering a regeneration and browser reload.

$ pgn --serve production