Add ability to generate context on a per-page basis