Prototype editorial book rendering#544
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementation
site/editorial.jsonnames 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
38remreading 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.pypython3 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.pygit diff --cached --checkbook/02_what_a_refusal_is.mdretained its original Git object hash,cff28d6595bce108e9d41f4813c7cdcf6dc41be9.