Skip to content

Prototype editorial book rendering#544

Merged
dcellison merged 1 commit into
mainfrom
editorial_book_chapter_test
Jul 23, 2026
Merged

Prototype editorial book rendering#544
dcellison merged 1 commit into
mainfrom
editorial_book_chapter_test

Conversation

@dcellison

Copy link
Copy Markdown
Owner

Summary

  • Opt chapter 2, "What a refusal is," into a renderer-only editorial treatment.
  • Generate a chapter eyebrow, a serif opening paragraph with a drop cap, and one source-verified pull quote.
  • Keep the prose column at its existing readable width while the pull quote moves into a margin rail on wide screens.
  • Leave every Markdown source and every unconfigured book page unchanged.

Implementation

site/editorial.json names the chapter and records the exact sentence selected for the pull quote. The book renderer derives "Chapter 2" from the source filename, marks the first visible letter without removing it from the accessibility tree, and inserts the quoted sentence as decorative HTML beside its original paragraph.

The metadata is checked during every site build. A missing source file, malformed treatment, repeated pull quote, or quote that no longer occurs exactly once stops the build with a specific error. This keeps the decoration attached to the prose that authorized it.

The treatment uses a wider page canvas around the existing 38rem reading column. On a wide display, the quote sits in the right margin with a real gutter between it and the prose. Below the rail breakpoint it returns to the reading column, where it takes the same width as the text. The duplicate quote is hidden from assistive technology and omitted from print; the original sentence remains present and readable.

Verification

  • python3 scripts/build_site.py
  • python3 scripts/validate_examples.py (1,275 entries, 0 errors, 0 warnings)
  • python3 scripts/test_vocabulary_schema.py (22 tests)
  • python3 scripts/test_name_forms.py (20 tests)
  • python3 scripts/test_content_vocabulary_decisions.py (8 tests)
  • python3 -m py_compile scripts/build_site.py
  • git diff --cached --check
  • Generated HTML assertions confirmed one treated page and 17 pages on the unchanged template.
  • Headless computed-style probes confirmed a right-hand margin quote at 1440 px and an inline 338 px quote at a 390 px frame, with the intended lede font, heading size, and float behavior.
  • book/02_what_a_refusal_is.md retained its original Git object hash, cff28d6595bce108e9d41f4813c7cdcf6dc41be9.

@dcellison
dcellison merged commit f016698 into main Jul 23, 2026
1 check passed
@dcellison
dcellison deleted the editorial_book_chapter_test branch July 23, 2026 21:15
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