Skip to content

Show the canonical article body with its footnotes on Lab unit pages - #20

Merged
erinepshovel-code merged 1 commit into
mainfrom
claude/textbook-chapters-needed-jd2nht
Jul 28, 2026
Merged

erinepshovel-code merged 1 commit into
mainfrom
claude/textbook-chapters-needed-jd2nht

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

The Article Lab unit pages rendered the parsed footnotes as Speaker B turns, but the article body itself was only a link ("The exact canonical unit is one interaction away"), so the reductio tests, practices, applications, and research field sat next to footnotes whose article was absent from the page.

Change

  • .eleventy.js — new canonUnitBody filter: returns a unit's exact canonical body lines (skips the heading line; stops before footnote lines, **[Notes …]** blocks, --- separators, and sub-headings). It mirrors the body extraction in scripts/verify-article-canon.mjs, with a comment binding the two.
  • src/lab/unit.njk — the Speaker A panel now renders that body as a blockquote.reading, keeping the "Open exact source and provenance" link and the existing Speaker B note turns unchanged.

The Lab conversation now reads as intended: exact article body (Speaker A) over its footnotes (Speaker B), then the interpretive layers.

Testing: npm test — 20/20 pass. Verified via direct Eleventy render that Article Five's lab page shows the full canonical body plus all five notes, and that non-article units (e.g. list-style Interdefinables) render their body lines sanely.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E93Rxmrs8bXHtWjD7z94bi


Generated by Claude Code

The Lab conversation previously rendered only the parsed notes plus a link to
the exact source, so the reviewed layers sat next to footnotes whose article
was absent. Speaker A now renders the exact canonical body via a canonUnitBody
filter that mirrors the body extraction in verify-article-canon.mjs, keeping
the provenance link and the Speaker B note turns unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E93Rxmrs8bXHtWjD7z94bi
@erinepshovel-code
erinepshovel-code marked this pull request as ready for review July 28, 2026 19:51
@erinepshovel-code
erinepshovel-code merged commit 1558c83 into main Jul 28, 2026
5 checks passed
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