@brandon_m_behring/book-scaffold-astro 5.1.0 → 5.2.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.
package/CLAUDE.md CHANGED
@@ -230,6 +230,25 @@ A consumer `public/_headers` wins unchanged. Use
230
230
  or `securityHeaders: false` when another layer owns all headers. Recipe 05 has
231
231
  the full precedence and customization contract.
232
232
 
233
+ ## Build-time Open Graph cards (v5.2, opt-in)
234
+
235
+ Set `seo: { ogCards: true }` in `defineBookConfig` to generate deterministic
236
+ 1200×630 PNG social cards for eligible static HTML that has no authored image.
237
+ The object form accepts `{ enabled?: boolean, exclude?: string[] }`; exclusions
238
+ are base-relative exact routes or whole-segment globs (`*` crosses one segment,
239
+ `**` crosses zero or more). Invalid patterns fail configuration.
240
+
241
+ Rendered image precedence is page/layout `ogImage` (including chapter
242
+ frontmatter `image`) → current corpus book manifest `image` → static
243
+ `seo.ogImage` → generated card. Generation runs after every consumer
244
+ integration and patches only missing OG/Twitter image tags. It writes
245
+ content-addressed `_og/<hash>.png` assets using package-owned local fonts and
246
+ no network request. Corpus pages retain their resolved book identity; corpus
247
+ surfaces use corpus identity; metadata combines `site` and Astro `base`
248
+ exactly once. A requested card that cannot render, write, or patch fails the
249
+ build. See Recipe 26 before changing card metadata, exclusion matching,
250
+ post-render ordering, or output paths.
251
+
233
252
  ## QA and content readiness
234
253
 
235
254
  Run `npm exec -- book-scaffold qa` after substantive content changes. It calls
package/README.md CHANGED
@@ -89,6 +89,27 @@ security defaults. A consumer-owned `public/_headers` wins unchanged;
89
89
  and `securityHeaders.contentSecurityPolicy` replaces only the default CSP.
90
90
  See [Recipe 05](./recipes/05-deploy-cloudflare.md#default-security-headers).
91
91
 
92
+ ## Build-time Open Graph cards
93
+
94
+ Social cards are an explicit, offline build feature:
95
+
96
+ ```ts
97
+ seo: {
98
+ ogCards: true,
99
+ // or: { enabled: true, exclude: ['/print/', '/private/*/', '/archive/**'] }
100
+ }
101
+ ```
102
+
103
+ Eligible static pages without a page image, corpus-book manifest image, or
104
+ static `seo.ogImage` receive a deterministic 1200×630 PNG at a
105
+ content-addressed `_og/<hash>.png` URL. Exact exclusions, one-segment `*`, and
106
+ cross-segment `**` are matched after Astro-base normalization. Package-owned
107
+ local fonts keep generation network-free; corpus identity and `site`/`base`
108
+ are applied exactly once. Requested-card failures fail the build instead of
109
+ emitting broken metadata. See
110
+ [Recipe 26](./recipes/26-generated-og-cards.md) for precedence, exclusion
111
+ grammar, output, and verification.
112
+
92
113
  ## Interactive demos
93
114
 
94
115
  The opt-in `@brandon_m_behring/book-scaffold-astro/demo` entry exports
Binary file
@@ -0,0 +1,89 @@
1
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font creation
14
+ efforts of academic and linguistic communities, and to provide a free and
15
+ open framework in which fonts may be shared and improved in partnership
16
+ with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The fonts,
20
+ including any derivative works, can be bundled, embedded, redistributed
21
+ and/or sold with any software provided that any reserved names are not used
22
+ by derivative works. The fonts and derivatives, however, cannot be released
23
+ under any other type of license. The requirement for fonts to remain under
24
+ this license does not apply to any document created using the fonts or their
25
+ derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may include
30
+ source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software components as
36
+ distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to, deleting, or
39
+ substituting -- in part or in whole -- any of the components of the Original
40
+ Version, by changing formats or by porting the Font Software to a new
41
+ environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical writer or
44
+ other person who contributed to the Font Software.
45
+
46
+ PERMISSION AND CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ of the Font Software, to use, study, copy, merge, embed, modify, redistribute,
49
+ and sell modified and unmodified copies of the Font Software, subject to the
50
+ following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components, in
53
+ Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy contains
57
+ the above copyright notice and this license. These can be included either as
58
+ stand-alone text files, human-readable headers or in the appropriate
59
+ machine-readable metadata fields within text or binary files as long as
60
+ those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font Name(s)
63
+ unless explicit written permission is granted by the corresponding Copyright
64
+ Holder. This restriction only applies to the primary font name as presented
65
+ to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any Modified
69
+ Version, except to acknowledge the contribution(s) of the Copyright Holder(s)
70
+ and the Author(s) or with their explicit written permission.
71
+
72
+ 5) The Font Software, modified or unmodified, in part or in whole, must be
73
+ distributed entirely under this license, and must not be distributed under
74
+ any other license. The requirement for fonts to remain under this license
75
+ does not apply to any document created using the Font Software.
76
+
77
+ TERMINATION
78
+ This license becomes null and void if any of the above conditions are not
79
+ met.
80
+
81
+ DISCLAIMER
82
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
83
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
84
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
85
+ TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE
86
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
87
+ INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
88
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE
89
+ THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,13 @@
1
+ # Inter font provenance
2
+
3
+ The renderer vendors the unmodified static TTF files from the official Inter
4
+ 4.1 release. Builds never download a font or read a system font.
5
+
6
+ - Release: <https://github.com/rsms/inter/releases/tag/v4.1>
7
+ - Archive: <https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip>
8
+ - Archive SHA-256: `9883fdd4a49d4fb66bd8177ba6625ef9a64aa45899767dde3d36aa425756b11e`
9
+ - `extras/ttf/Inter-Regular.ttf` SHA-256: `40d692fce188e4471e2b3cba937be967878f631ad3ebbbdcd587687c7ebe0c82`
10
+ - `extras/ttf/Inter-Bold.ttf` SHA-256: `288316099b1e0a47a4716d159098005eef7c0066921f34e3200393dbdb01947f`
11
+
12
+ The adjacent `LICENSE.txt` is copied verbatim from that release (SIL Open Font
13
+ License 1.1).
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AstroUserConfig, AstroIntegration, MarkdownHeading } from 'astro';
2
- import { c as BookConfigOptions, h as BookScaffoldIntegrationOptions, d as BookCorpus, l as CorpusApparatusRoute, e as BookCorpusInput, m as CorpusBook, k as ChaptersRenderer, v as SiblingBooks, x as Style } from './types-D1QZgKMO.js';
3
- export { B as BOOK_PRESETS, a as BOOK_PROFILES, b as BookConfigError, f as BookPreset, g as BookProfile, i as BookSchemasOptions, C as CORPUS_APPARATUS_ROUTES, j as ChapterFor, n as CorpusBookInput, F as FreshnessAffordance, o as FrontmatterRouteConfig, N as NUMBER_STYLES, p as NumberStyle, P as PartKey, q as PartialRouteToggles, r as ProfileDefinition, R as ReleaseStatusConfig, s as RouteToggles, S as SecurityHeadersConfig, t as SiblingBookDescriptor, u as SiblingBookEntry, w as StatusBadge, y as StyleInput, V as VolatilityBadge, z as composeStyles, A as defineProfile, D as defineStyle, E as normalizeFrontmatterConfig, G as resolvePreset, H as resolveProfile } from './types-D1QZgKMO.js';
2
+ import { c as BookConfigOptions, h as BookScaffoldIntegrationOptions, d as BookCorpus, l as CorpusApparatusRoute, e as BookCorpusInput, m as CorpusBook, k as ChaptersRenderer, v as SiblingBooks, x as Style } from './types-DjqMnwHw.js';
3
+ export { B as BOOK_PRESETS, a as BOOK_PROFILES, b as BookConfigError, f as BookPreset, g as BookProfile, i as BookSchemasOptions, C as CORPUS_APPARATUS_ROUTES, j as ChapterFor, n as CorpusBookInput, F as FreshnessAffordance, o as FrontmatterRouteConfig, N as NUMBER_STYLES, p as NumberStyle, O as OgCardsConfig, P as PartKey, q as PartialRouteToggles, r as ProfileDefinition, R as ReleaseStatusConfig, s as RouteToggles, S as SecurityHeadersConfig, t as SiblingBookDescriptor, u as SiblingBookEntry, w as StatusBadge, y as StyleInput, V as VolatilityBadge, z as composeStyles, A as defineProfile, D as defineStyle, E as normalizeFrontmatterConfig, G as resolvePreset, H as resolveProfile } from './types-DjqMnwHw.js';
4
4
  import { E as volatilityLevels, c as academicParts, Q as Question } from './schemas-CKipJ5Ie.js';
5
5
  export { A as AcademicChapter, B as BloomLevel, C as CourseNotesChapter, G as GlossaryTerm, M as MinimalChapter, P as Provenance, a as QuestionType, R as ResearchPortfolioChapter, T as ToolsChapter, b as academicChapterSchema, d as bloomLevels, e as changeKinds, f as changelogSchema, g as chapterStatus, h as citationBackstops, i as courseNotesChapterSchema, j as glossarySchema, l as layoutModes, m as minimalChapterSchema, p as patternCategories, k as patternsSchema, n as provenanceObject, o as provenanceSchema, q as questionDifficulties, r as questionSchema, s as questionTypes, t as refineQuestion, u as refinedQuestionSchema, v as researchPortfolioChapterSchema, w as sourceTiers, x as sourceTiersResearch, y as sourcesSchema, z as toolSlugs, D as toolsChapterSchema } from './schemas-CKipJ5Ie.js';
6
6
  export { KIND_LABEL, ResolvedTheoremLabel, THEOREM_KINDS, TheoremKind, TheoremLabelProps, resolveTheoremNumber, theoremLabel } from './lib/theorem-label.js';