Skip to content

Features/multi page templates - #9

Merged
connorferster merged 3 commits into
mainfrom
features/multi-page-templates
Aug 14, 2026
Merged

Features/multi page templates#9
connorferster merged 3 commits into
mainfrom
features/multi-page-templates

Conversation

@connorferster

Copy link
Copy Markdown
Contributor

No description provided.

connor-sp and others added 3 commits August 14, 2026 02:38
Replace the first-page/remaining-pages document model with named page
templates. `_doc.templates` is a mapping of name -> {margins, background};
the first entry is the starting template. Page size and orientation remain
document-wide.

Add source-level template switching:
- `_pagebreak` accepts an optional template name/index for following pages
- `_nextpagetemplate` arms the template to switch to at the next break

Template flow is managed by ReportLab's NextPageTemplate. Each PageTemplate
records a page-index -> template-name map during the build so post-processing
can overlay the correct background per page. Config merge treats `templates`
as a whole mapping from the highest-priority layer.

Migrate defaults, test configs, examples, and docs to the new schema; add
tests covering template resolution, both blocks, the build-time page map,
and the config merge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@connorferster
connorferster force-pushed the features/multi-page-templates branch from bc4b63d to 8e8b62a Compare August 14, 2026 02:39
@connorferster
connorferster merged commit fce4eeb into main Aug 14, 2026
1 check passed
@connorferster
connorferster deleted the features/multi-page-templates branch August 14, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants