Site generation

On generation Pagegen will build site from pages in content directory. The command must be run from the Pagegen root directory or one of its sub directories.

$ pgn --generate <environment>

The environment is the name of the section in site.conf.

After generation the generated HTML will be in the site directory/<environment>, simply copy this directory to your web server to go live.

Environments

Pagegen supports defining settings for multiple environments, so that the site may be generated with variations. The environment is also available as an environment variable to the hook scripts to allowing making customization's for the various environments.

A test environment could be generated with settings for absolute paths and .html extension so can test locally without web server, whilst a production environment may have no .html extension for clean urls and the post_generate hook could copy the site to FTP server.

Site configuration (site.conf)

Site generation can be configured by the site.conf, found in the Pagegen root directory, see example.

Example site configuration

[prod]
base_url=http://pagegen.phnd.net
theme=pgsite
absolute_urls=False

[test]
base_url=http://localhost:8000
theme=pgsite

To generate prod environment run the following.

$ pgn -g prod