Fix page parity: images on even (left) pages, text on odd (right) pages

Add a section-title page ("Die Geschichten") as page 3 so all stories
begin on page 4. Image and text for each scene now land on the same
facing spread (even=left image, odd=right text). Page count: 99 → 100.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-03 19:14:43 +02:00
parent 2abcda73e8
commit 6b61cf206a
4 changed files with 50 additions and 2 deletions
+2 -2
View File
@@ -69,8 +69,8 @@ async function build() {
const outPath = join(root, 'output', 'book.html');
await writeFile(outPath, html, 'utf-8');
// copyright + TOC + (4 scenes × 2 pages per story) + finale
const pageCount = 2 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0) + 1;
// imprint + TOC + section-title + (4 scenes × 2 pages per story) + finale
const pageCount = 3 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0) + 1;
await writeFile(
join(root, 'output', 'book-meta.json'),
JSON.stringify({ pageCount, storyCount: stories.length, builtAt: new Date().toISOString() }, null, 2),