1. ollyc
  2. pages

Overview

HTTPS SSH

Usage

Merge a directory of data files with a single HTML template, generating one output html file per input document:

pagetwo-merge --output "build/{input.stem}.html" --template page.html *.rst

Batch render template files with template context data loaded via Python code, JSON datafiles or JSON literals:

pagetwo --data '{"foo": "bar"}' context.py -- templates/*

Note that you can also load data from any script that returns JSON output, by using named pipes:

pagetwo --data <(curl -s 'https://api.ipify.org?format=json') -- templates/*

Jinja2, Chameleon, Genshi or Kajiki templating systems are all supported.