Running pageit¶
pageit is designed for developers who need to quickly generate a standalone static website. There are several command-line options that may be useful for development.
Basic Example¶
The most common thing you want pageit to do is to process the files in the current directory:
$ pageit
Sometimes you want to run pageit on a different directory:
$ pageit some/other/path
Most often, you’ll want to run pageit, have it automatically re-run when files change, and serve it out for testing:
$ pageit --watch --serve
Command-Line Options¶
All command-line options are optional and default to False or ignored
unless inidicated otherwise.
-
-n,--dry-run¶ Do not perform destructive operations such as generating output or deleting files.
-
-w,--watch¶ Watch the path using watchdog and re-run pageit when files change.
See
watch()for more details.
-
-s<PORT=80>,--serve<PORT=80>¶ Serve the path using the SimpleHTTPServer. This is not recommended for production environments.
See
serve()for more details.
-
-f<PATH>,--config<PATH>¶ Path to YAML configuration file (default:
pageit.yml) containing a dictionary of environment values (key/value pairs). The environment values are passed tomakotemplates during rendering via the specialsitevariable. The configuration file is first searched for in the current working directory and then in thepageitdirectory.See Special Mako Variables in
mako()for more details.
New in version 0.2.1.
-
-e<ENV>,--env<ENV>¶ Name of the configuration environment to load (default:
default). The specialdefaultenvironment values are always loaded first and then extended with the values from the environment named this option.See Special Mako Variables in
mako()for more details.
New in version 0.2.1.
-
--tmp<PATH>¶ Directory in which to store generated
makotemplates. By default, generated templates are not stored.
-
--ignore-mtime¶ Render all the templates rather than only those that have changed (or whose dependencies have changed). For templates that have complicated inheritance rules, this flag may have to be set to get templates to render.
See
mako_mtime()for more details.
-
--noerr¶ Do not alter the template output to be an HTML error page if an error arises during rendering. By default, template errors will be captured and inserted into the output file.
-
--ext¶ Extension for mako templates (default:
.mako). Directory names ending with this string be ignored.