@brandon_m_behring/book-scaffold-astro 5.0.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/src/types.ts CHANGED
@@ -125,6 +125,18 @@ export interface SecurityHeadersConfig {
125
125
  contentSecurityPolicy?: string;
126
126
  }
127
127
 
128
+ /**
129
+ * v5.2.0 (#157): build-time Open Graph card generation.
130
+ *
131
+ * Omit `enabled` (or set it to `true`) to enable generation when the object
132
+ * form is present. `exclude` contains base-relative route patterns validated
133
+ * by the OG-card integration during config evaluation.
134
+ */
135
+ export interface OgCardsConfig {
136
+ enabled?: boolean;
137
+ exclude?: readonly string[];
138
+ }
139
+
128
140
  /**
129
141
  * v4.26.2 (#149): book-level release state rendered by
130
142
  * `<PreReleaseBanner>` across every page.
@@ -313,9 +325,10 @@ export interface BookConfigOptions {
313
325
  * `ogImage` — default Open Graph image URL (relative to the site root, or
314
326
  * absolute). When omitted, no `<meta property="og:image">` is emitted by
315
327
  * default; per-page `Astro.props.ogImage` can still set one. Consumers
316
- * opt-in to OG cards by adding e.g. `/og-default.png` to their `public/`
317
- * AND setting `seo: { ogImage: '/og-default.png' }`. Avoids broken-link
318
- * meta tags on consumers who haven't authored an OG image yet.
328
+ * opt in to a static default by adding e.g. `/og-default.png` to `public/`
329
+ * and setting `seo: { ogImage: '/og-default.png' }`. A static default
330
+ * suppresses generation; use `ogCards` below for generated cards. Omitting
331
+ * both avoids broken-link meta tags when no image has been authored.
319
332
  *
320
333
  * `twitterHandle` — adds `<meta name="twitter:site" content="@handle">`
321
334
  * when set. Omitted by default.
@@ -332,6 +345,12 @@ export interface BookConfigOptions {
332
345
  seo?: {
333
346
  ogImage?: string;
334
347
  twitterHandle?: string;
348
+ /**
349
+ * v5.2.0 (#157): opt into deterministic, build-time social cards. `true`
350
+ * uses the defaults; the object form can disable generation explicitly or
351
+ * add base-relative route exclusions.
352
+ */
353
+ ogCards?: boolean | OgCardsConfig;
335
354
  sitemap?: {
336
355
  filter?: (page: string) => boolean;
337
356
  customPages?: string[];