@brandon_m_behring/book-scaffold-astro 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,8 +26,13 @@
26
26
  * import Base from '../layouts/Base.astro';
27
27
  * ---
28
28
  * <Base title="Chapter 1" description="...">
29
- * <main>...</main>
29
+ * <article class="prose">...</article>
30
30
  * </Base>
31
+ *
32
+ * Landmark ownership: Base emits the single `<main>` landmark for every
33
+ * page (both the sidebar and full-bleed branches below). Slotted content
34
+ * must NOT wrap itself in `<main>` — use `<article>` / `<section>` / `<div>`
35
+ * — or the page ends up with duplicate `<main>` landmarks (a11y, #91).
31
36
  */
32
37
  import '@fontsource-variable/roboto';
33
38
  import '@fontsource-variable/source-code-pro';
@@ -169,7 +174,7 @@ const ogDescription = description ?? bookConfig.description ?? '';
169
174
  <main class="layout-main"><slot /></main>
170
175
  </div>
171
176
  ) : (
172
- <slot />
177
+ <main><slot /></main>
173
178
  )}
174
179
  <script is:inline>
175
180
  (function () {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@brandon_m_behring/book-scaffold-astro",
3
3
  "description": "Astro 6 + MDX toolkit for long-form technical books. Profile-aware (academic / tools / minimal); ships Tufte typography, KaTeX, BibTeX citations, Pagefind, Cloudflare Workers deploy. See PACKAGE_DESIGN.md for the API contract.",
4
- "version": "4.11.0",
4
+ "version": "4.12.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Brandon Behring",
package/pages/print.astro CHANGED
@@ -36,12 +36,12 @@ const rendered = await Promise.all(
36
36
  ---
37
37
 
38
38
  <Base title="Book (print edition)" description="Full book rendered as a single paginated document for PDF export.">
39
- <main class="prose print-edition">
39
+ <div class="prose print-edition">
40
40
  {rendered.map(({ entry, Content }) => (
41
41
  <section class="chapter-print">
42
42
  <ChapterHeader data={entry.data} />
43
43
  <Content components={mdxComponents} />
44
44
  </section>
45
45
  ))}
46
- </main>
46
+ </div>
47
47
  </Base>
@@ -19,7 +19,7 @@ import Base from '../layouts/Base.astro';
19
19
  >
20
20
  <link rel="stylesheet" href="/pagefind/pagefind-ui.css" slot="head" />
21
21
 
22
- <main class="prose search-page">
22
+ <div class="prose search-page">
23
23
  <h1>Search</h1>
24
24
  <p>
25
25
  Full-text search runs in your browser. The index is generated at
@@ -27,7 +27,7 @@ import Base from '../layouts/Base.astro';
27
27
  the page.
28
28
  </p>
29
29
  <div id="search"></div>
30
- </main>
30
+ </div>
31
31
 
32
32
  <script src="/pagefind/pagefind-ui.js" is:inline></script>
33
33
  <script is:inline>
@@ -43,7 +43,7 @@ Re-tune with Playwright + `browser_take_screenshot` at the four viewports above
43
43
  </Base>
44
44
  ```
45
45
 
46
- Default is `showSidebar={true}`. The landing page (`src/pages/index.astro`) sets false because it's a one-page demo with no chapter context. Every chapter route inherits the default (true).
46
+ Default is `showSidebar={true}`. Set it false on full-bleed surfaces — landing pages, splash screens, search results — that have no chapter context (`Base.astro` still emits the page's single `<main>` landmark in that branch). Every chapter route inherits the default (true).
47
47
 
48
48
  ## Customizing the sidebar
49
49
 
@@ -6,6 +6,8 @@
6
6
 
7
7
  The full master plan with discussion lives at `~/.claude/plans/i-want-to-investigate-recursive-yao.md`. The decisions ledger below is the operational summary.
8
8
 
9
+ > **Scaffold ledger vs. consumer decision log.** This file is the *scaffold's own* design ledger. Separately, since v4.12.0 (#90) `create-book` scaffolds every new book with a `decisions/` directory (numbered ADRs + `ADR_TEMPLATE.md` + `README.md`) so each book keeps its own decision log by construction. The two are independent: this ledger explains why the scaffold is shaped as it is; a book's `decisions/` explains why that book is shaped as it is.
10
+
9
11
  ## Strategic decisions (Round 1)
10
12
 
11
13
  ### D1. Canonical repo