@griddo/core 12.9.0-rc.1 → 12.9.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.
@@ -336,13 +336,137 @@ interface ContentPresence {
336
336
  interface JsConversionOptions {
337
337
  /** Extract metadata from HTML */
338
338
  extractMetadata?: boolean;
339
- /** Skip image conversion (keep as HTML) */
339
+ /** Drop the images: neither the image nor its alternative text survives */
340
340
  skipImages?: boolean;
341
341
  /** List of HTML tags to strip */
342
342
  stripTags?: Array<string>;
343
+ /** Preprocessing options */
344
+ preprocessing?: JsPreprocessingOptions;
343
345
  /** Enable debug mode with diagnostic warnings */
344
346
  debug?: boolean;
345
347
  }
348
+ /** Preprocessing options */
349
+ interface JsPreprocessingOptions {
350
+ /** Enable preprocessing (discards header and nav elements) */
351
+ enabled?: boolean;
352
+ /** Remove navigation elements */
353
+ removeNavigation?: boolean;
354
+ /** Remove form elements */
355
+ removeForms?: boolean;
356
+ }
357
+ /** What the markdown does with the images of the page */
358
+ type LlmsImages = "dedupe" | "keep" | "skip";
359
+ /** Options for the per-page markdown generated for LLMs */
360
+ interface LlmsMarkdownConfig {
361
+ /**
362
+ * What the markdown does with the images of the page:
363
+ *
364
+ * - `"skip"` drops them. The converter writes neither the image nor its
365
+ * alternative text, so the page loses them. This is the default.
366
+ * - `"keep"` converts every one of them.
367
+ * - `"dedupe"` converts them, and collapses an image that a module paints
368
+ * twice —one for desktop, one for mobile, toggled by CSS— into a single
369
+ * one.
370
+ */
371
+ images?: LlmsImages;
372
+ /**
373
+ * Collect the links dropped with the header and the nav menu into a
374
+ * `## Navigation` section at the top of the markdown. Opt-in: off unless
375
+ * the instance sets it to `true`.
376
+ */
377
+ includeNav?: boolean;
378
+ /**
379
+ * Point the internal links of the markdown at the markdown mirror of the
380
+ * target page. With `false` they keep pointing at the page itself. Defaults
381
+ * to `true`.
382
+ */
383
+ linkToMarkdown?: boolean;
384
+ /**
385
+ * Write the internal links of the markdown as absolute URLs, with their
386
+ * origin. With `false` they keep the root path the CMS wrote. Defaults to
387
+ * `true`.
388
+ */
389
+ absoluteLinks?: boolean;
390
+ /**
391
+ * Open the markdown with a YAML front matter holding the metadata of the
392
+ * page: title, description, url, locale, site and render date. Defaults to
393
+ * `true`.
394
+ */
395
+ frontMatter?: boolean;
396
+ /**
397
+ * Raw options for the HTML to markdown converter, which replace the ones
398
+ * that Griddo passes to it. The images are not here, because `images` owns
399
+ * that decision.
400
+ */
401
+ converter?: Omit<JsConversionOptions, "skipImages">;
402
+ }
403
+ /** Options for the `llms.txt` index of the domain */
404
+ interface LlmsIndexConfig {
405
+ /**
406
+ * Your own markdown, placed in `llms.txt` between the header that Griddo
407
+ * generates and the list of page links.
408
+ */
409
+ header?: string;
410
+ /**
411
+ * Your own markdown, placed in `llms.txt` after the list of page links.
412
+ */
413
+ footer?: string;
414
+ }
415
+ /**
416
+ * The flat shape of `llms`, which held the options of three artifacts and the
417
+ * ones of the converter in a single level. Griddo still reads these keys, and
418
+ * the render warns about each one that it finds. A later version removes them.
419
+ */
420
+ interface DeprecatedLlmsConfig {
421
+ /** @deprecated Use `markdown.converter.extractMetadata`. */
422
+ extractMetadata?: boolean;
423
+ /** @deprecated Use `markdown.images`: `"keep"` or `"dedupe"`. */
424
+ skipImages?: boolean;
425
+ /** @deprecated Use `markdown.converter.stripTags`. */
426
+ stripTags?: Array<string>;
427
+ /** @deprecated Use `markdown.converter.preprocessing`. */
428
+ preprocessing?: JsPreprocessingOptions;
429
+ /** @deprecated Use `markdown.converter.debug`. */
430
+ debug?: boolean;
431
+ /** @deprecated Use `markdown.includeNav`. */
432
+ includeNav?: boolean;
433
+ /** @deprecated Use `markdown.images`: `"dedupe"` or `"keep"`. */
434
+ dedupeImages?: boolean;
435
+ /** @deprecated Use `markdown.linkToMarkdown`. */
436
+ linkToMarkdown?: boolean;
437
+ /** @deprecated Use `markdown.absoluteLinks`. */
438
+ absoluteLinks?: boolean;
439
+ /** @deprecated Use `markdown.frontMatter`. */
440
+ frontMatter?: boolean;
441
+ /** @deprecated Use `index.header`. */
442
+ header?: string;
443
+ /** @deprecated Use `index.footer`. */
444
+ footer?: string;
445
+ }
446
+ /**
447
+ * Options for the LLM surface of the site. Each artifact keeps its own group,
448
+ * so the instance reads the path and knows which file the option changes.
449
+ */
450
+ interface LlmsConfig extends DeprecatedLlmsConfig {
451
+ /** The markdown mirror of each page */
452
+ markdown?: LlmsMarkdownConfig;
453
+ /** The `llms.txt` index of the domain */
454
+ index?: LlmsIndexConfig;
455
+ /**
456
+ * Announce the LLM surface of the site from the page itself, with the link
457
+ * relations that llmstxt.org recommends: `alternate` for the markdown mirror
458
+ * of the page, and `describedby` for the `llms.txt` that covers it. Defaults
459
+ * to `false`: announcing the mirror invites search engines to index it, so
460
+ * turn it on once the CDN answers the markdown with `X-Robots-Tag: noindex`.
461
+ * Each link appears only when the render writes that file.
462
+ *
463
+ * Leaving it off does not hide the mirror. The links of `llms.txt` already
464
+ * point at it whenever the render writes it, and that file is a door of its
465
+ * own. This switch decides one of the two, so the `noindex` is what actually
466
+ * settles the duplicate content.
467
+ */
468
+ discoveryLinks?: boolean;
469
+ }
346
470
  interface Config {
347
471
  autotypes?: Partial<Schema.AutoTypesConfig>;
348
472
  schemas: {
@@ -355,7 +479,7 @@ interface Config {
355
479
  themes: Schema.Themes;
356
480
  subthemes?: Array<string>;
357
481
  socials?: Schema.Socials;
358
- llms?: JsConversionOptions;
482
+ llms?: LlmsConfig;
359
483
  };
360
484
  ui: {
361
485
  components: Record<string, Schema.Component>;
@@ -375,4 +499,4 @@ interface Config {
375
499
  };
376
500
  };
377
501
  }
378
- export type { BackgroundImageSizesProps, Breadcrumb, CloudinaryDefaults, Config, ContentPresence, ContentTypeRelations, FetchPriority, FooterModule, FullPath, GriddoDamDefaults, HeaderModule, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ISOLocale, JsConversionOptions, LibraryComponentProps, ListContentType, Locale, LocaleTranslations, NavigationModule, Page, PageIntegration, PageLanguage, Renderers, ResponsiveImageProps, Site, SiteLanguage, SocialName, TimeZone };
502
+ export type { BackgroundImageSizesProps, Breadcrumb, CloudinaryDefaults, Config, ContentPresence, ContentTypeRelations, DeprecatedLlmsConfig, FetchPriority, FooterModule, FullPath, GriddoDamDefaults, HeaderModule, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ISOLocale, JsConversionOptions, JsPreprocessingOptions, LibraryComponentProps, ListContentType, LlmsConfig, LlmsImages, LlmsIndexConfig, LlmsMarkdownConfig, Locale, LocaleTranslations, NavigationModule, Page, PageIntegration, PageLanguage, Renderers, ResponsiveImageProps, Site, SiteLanguage, SocialName, TimeZone };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@griddo/core",
3
3
  "description": "Reload version of Griddo Core",
4
4
  "license": "UNLICENSED",
5
- "version": "12.9.0-rc.1",
5
+ "version": "12.9.0",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -119,5 +119,5 @@
119
119
  "publishConfig": {
120
120
  "access": "public"
121
121
  },
122
- "gitHead": "6ca432142f7b2645958c4e65471bb9b8a6e7cc82"
122
+ "gitHead": "d3a3e8da5f6a9c89f60c6055a0f133a0d7c05691"
123
123
  }