ssqch 0.12.0 → 0.13.1

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.
Files changed (130) hide show
  1. package/bundled/completions/bash +66 -8
  2. package/bundled/completions/elvish +23 -4
  3. package/bundled/completions/fish +36 -25
  4. package/bundled/completions/powershell +25 -4
  5. package/bundled/completions/zsh +44 -10
  6. package/bundled/docs/agents.md +2 -2
  7. package/bundled/docs/build-summary.md +1 -1
  8. package/bundled/docs/comparing-builds.md +2 -2
  9. package/bundled/docs/configuring.md +3 -6
  10. package/bundled/docs/deploying.md +1 -1
  11. package/bundled/docs/field-guide.md +4 -4
  12. package/bundled/docs/github-pages.md +1 -0
  13. package/bundled/docs/index.md +1 -1
  14. package/bundled/docs/install.md +1 -1
  15. package/bundled/docs/known-gaps.md +1 -1
  16. package/bundled/docs/markdown.md +8 -12
  17. package/bundled/docs/nav.yml +5 -1
  18. package/bundled/docs/netlify.md +4 -2
  19. package/bundled/docs/patrol.md +48 -0
  20. package/bundled/docs/plugins.md +6 -6
  21. package/bundled/docs/robots.md +85 -0
  22. package/bundled/docs/seo.md +2 -38
  23. package/bundled/docs/serving-markdown.md +142 -0
  24. package/bundled/docs/template-languages.md +1 -1
  25. package/bundled/docs/templates.md +1 -1
  26. package/bundled/docs/trailheads/from-hugo.md +5 -3
  27. package/bundled/docs/trailheads/from-jekyll.md +54 -13
  28. package/bundled/docs/trailheads/from-mkdocs.md +15 -12
  29. package/bundled/docs/trailheads/from-vitepress.md +13 -11
  30. package/bundled/docs/trailheads.md +3 -3
  31. package/bundled/docs/where-values-come-from.md +5 -5
  32. package/bundled/docs/writing-plugins.md +69 -0
  33. package/bundled/ssqch.d.ts +118 -44
  34. package/bundled/starter/engines/index.edge +1 -0
  35. package/bundled/starter/engines/index.ejs +1 -0
  36. package/bundled/starter/engines/index.hbs +1 -0
  37. package/bundled/starter/engines/index.liquid +1 -0
  38. package/bundled/starter/engines/layout.edge +7 -0
  39. package/bundled/starter/engines/layout.ejs +4 -0
  40. package/bundled/starter/engines/layout.hbs +4 -0
  41. package/bundled/starter/engines/layout.liquid +4 -0
  42. package/bundled/starter/src/_data/site.json +1 -0
  43. package/bundled/starter/src/_includes/layout.jinja +4 -0
  44. package/bundled/starter/src/index.jinja +1 -0
  45. package/bundled/starter/ssqch.config.js +14 -1
  46. package/bundled/starter-docs/engines/edge/base.edge +7 -0
  47. package/bundled/starter-docs/engines/edge/doc.edge +4 -0
  48. package/bundled/starter-docs/engines/ejs/base.ejs +4 -0
  49. package/bundled/starter-docs/engines/ejs/doc.ejs +4 -0
  50. package/bundled/starter-docs/engines/hbs/base.hbs +4 -0
  51. package/bundled/starter-docs/engines/hbs/doc.hbs +3 -0
  52. package/bundled/starter-docs/engines/liquid/base.liquid +4 -0
  53. package/bundled/starter-docs/engines/liquid/doc.liquid +4 -0
  54. package/bundled/starter-docs/src/_data/site.json +1 -0
  55. package/bundled/starter-docs/src/_includes/base.jinja +4 -0
  56. package/bundled/starter-docs/src/_includes/doc.jinja +4 -0
  57. package/bundled/starter-docs/src/assets/docs.css +4 -0
  58. package/bundled/starter-docs/src/assets/docs.js +17 -0
  59. package/bundled/starter-docs/ssqch.config.js +14 -1
  60. package/lib/assets.js +9 -9
  61. package/lib/chunk-25WERNDD.js +112 -0
  62. package/lib/{chunk-4ZMNLWE4.js → chunk-2BJFGKOE.js} +2 -2
  63. package/lib/{chunk-M2BBE2C3.js → chunk-3ZTRIO6O.js} +18 -17
  64. package/lib/{chunk-57HLSKZS.js → chunk-4AZFCSGJ.js} +2 -2
  65. package/lib/{chunk-ULQHJ4TS.js → chunk-55WXDGO4.js} +3 -3
  66. package/lib/{chunk-JX43SJHU.js → chunk-6FY77I4M.js} +24 -22
  67. package/lib/{chunk-RY3KLUQ3.js → chunk-6OUCRDYI.js} +267 -202
  68. package/lib/{chunk-EVFNYUTR.js → chunk-6U5VIQVY.js} +5 -5
  69. package/lib/{chunk-N3IZ44XY.js → chunk-7U5GWTEH.js} +88 -54
  70. package/lib/{chunk-VTYQ3JKL.js → chunk-AIJNG6MJ.js} +2 -2
  71. package/lib/{chunk-IIBZPHAW.js → chunk-C2Q7JKFI.js} +8 -8
  72. package/lib/{chunk-6CSH757V.js → chunk-DFJFHULZ.js} +33 -8
  73. package/lib/{chunk-XVV7JJK7.js → chunk-ENWDM2RW.js} +40 -39
  74. package/lib/{chunk-JUALMFW3.js → chunk-ER72RPD6.js} +1 -1
  75. package/lib/{chunk-RFREB3SI.js → chunk-F3JPNFCZ.js} +7 -7
  76. package/lib/{chunk-LLOA3QXV.js → chunk-FENJHLNM.js} +3 -2
  77. package/lib/{chunk-UU43WIZG.js → chunk-FJML7INB.js} +4 -2
  78. package/lib/{chunk-IZCF4UH3.js → chunk-FQZDUDFK.js} +1 -1
  79. package/lib/chunk-GM5SHCTU.js +272 -0
  80. package/lib/{chunk-GVHQ37JE.js → chunk-GSNRAGKQ.js} +10 -5
  81. package/lib/{chunk-L2IY4P6O.js → chunk-GU7BBYWB.js} +3 -3
  82. package/lib/{chunk-RGYJQYW3.js → chunk-HDKU6LRI.js} +32 -5
  83. package/lib/{chunk-IQUGLVZY.js → chunk-K5WZ2VYK.js} +4 -4
  84. package/lib/{chunk-JVT5ZRRH.js → chunk-OOKBXQAY.js} +5 -5
  85. package/lib/{chunk-MOLTDO5A.js → chunk-SNQOHNXE.js} +1 -1
  86. package/lib/{chunk-Z3XH4KWX.js → chunk-SPIFZBIW.js} +1 -1
  87. package/lib/{chunk-FNNXRVSU.js → chunk-T5IUI7W7.js} +10 -10
  88. package/lib/{chunk-5HEZ3WUQ.js → chunk-TGSVSG2G.js} +2 -2
  89. package/lib/{chunk-3GROJ3TY.js → chunk-U2KEMVXO.js} +24 -17
  90. package/lib/{chunk-4B3N44SN.js → chunk-UHRBPZ4A.js} +3 -3
  91. package/lib/{chunk-GWWA5Y3X.js → chunk-ULCT3PAV.js} +1 -1
  92. package/lib/{chunk-7RGEWDLF.js → chunk-UZNUS7RP.js} +10 -8
  93. package/lib/{chunk-DZ5F5XSI.js → chunk-V3G2QGL3.js} +10 -105
  94. package/lib/{chunk-DOHOKUGB.js → chunk-VILOEVK7.js} +50 -26
  95. package/lib/{chunk-DXMDXHV7.js → chunk-WGAIE3DD.js} +15 -14
  96. package/lib/{chunk-G3RFQDKO.js → chunk-WUCRAV36.js} +8 -6
  97. package/lib/{chunk-52ROOMBZ.js → chunk-XYAWJTHM.js} +9 -9
  98. package/lib/{chunk-L3K7MMFC.js → chunk-YA23NDMW.js} +2 -2
  99. package/lib/{chunk-R7PBREXL.js → chunk-YNJNMQWU.js} +8 -5
  100. package/lib/{chunk-AK7ZKSZP.js → chunk-ZMG25MXF.js} +17 -16
  101. package/lib/cli.js +56 -34
  102. package/lib/elements.js +9 -9
  103. package/lib/from-hugo.js +36 -0
  104. package/lib/from-jekyll.js +41 -0
  105. package/lib/from-mkdocs.js +49 -0
  106. package/lib/from-vitepress.js +49 -0
  107. package/lib/image.js +10 -10
  108. package/lib/links.js +9 -9
  109. package/lib/llms.js +619 -54
  110. package/lib/minify.js +10 -10
  111. package/lib/redirects.js +9 -9
  112. package/lib/robots.js +87 -0
  113. package/lib/rss.js +22 -12
  114. package/lib/sass.js +10 -10
  115. package/lib/sitemap.js +22 -33
  116. package/lib/ssqch.js +5 -5
  117. package/lib/vue.js +14 -13
  118. package/package.json +21 -1
  119. package/types/from-hugo.d.ts +5 -0
  120. package/types/from-jekyll.d.ts +11 -0
  121. package/types/from-mkdocs.d.ts +11 -0
  122. package/types/from-vitepress.d.ts +5 -0
  123. package/types/index.d.ts +45 -29
  124. package/types/llms.d.ts +18 -8
  125. package/types/robots.d.ts +13 -0
  126. package/types/sass.d.ts +1 -1
  127. package/types/sitemap.d.ts +3 -5
  128. package/wasm/markdown.wasm +0 -0
  129. /package/lib/{chunk-JX43SJHU.js.LEGAL.txt → chunk-6FY77I4M.js.LEGAL.txt} +0 -0
  130. /package/lib/{chunk-R7PBREXL.js.LEGAL.txt → chunk-YNJNMQWU.js.LEGAL.txt} +0 -0
@@ -2,38 +2,39 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  isAsset
5
- } from "./chunk-IZCF4UH3.js";
5
+ } from "./chunk-FQZDUDFK.js";
6
6
  import {
7
7
  build
8
- } from "./chunk-JX43SJHU.js";
9
- import "./chunk-L3K7MMFC.js";
10
- import "./chunk-DZ5F5XSI.js";
8
+ } from "./chunk-6FY77I4M.js";
9
+ import "./chunk-YA23NDMW.js";
10
+ import "./chunk-V3G2QGL3.js";
11
11
  import "./chunk-4Q6WMTER.js";
12
- import "./chunk-4B3N44SN.js";
12
+ import "./chunk-UHRBPZ4A.js";
13
+ import "./chunk-25WERNDD.js";
13
14
  import {
14
15
  fileHash
15
- } from "./chunk-JUALMFW3.js";
16
+ } from "./chunk-ER72RPD6.js";
16
17
  import {
17
18
  filesRead
18
19
  } from "./chunk-3NYSSA2C.js";
19
- import "./chunk-DOHOKUGB.js";
20
- import "./chunk-GWWA5Y3X.js";
20
+ import "./chunk-VILOEVK7.js";
21
+ import "./chunk-ULCT3PAV.js";
21
22
  import {
22
23
  summary
23
- } from "./chunk-EVFNYUTR.js";
24
+ } from "./chunk-6U5VIQVY.js";
24
25
  import "./chunk-AD3HAW3W.js";
25
26
  import "./chunk-YCOTX2VM.js";
26
27
  import {
27
28
  dirsOf
28
29
  } from "./chunk-DDV6JEC2.js";
29
- import "./chunk-RY3KLUQ3.js";
30
+ import "./chunk-6OUCRDYI.js";
31
+ import "./chunk-SPIFZBIW.js";
30
32
  import "./chunk-FVZ5JBRI.js";
31
- import "./chunk-Z3XH4KWX.js";
32
- import "./chunk-UU43WIZG.js";
33
+ import "./chunk-FJML7INB.js";
33
34
  import {
34
35
  describeThrown,
35
36
  loadedFiles
36
- } from "./chunk-57HLSKZS.js";
37
+ } from "./chunk-4AZFCSGJ.js";
37
38
  import "./chunk-CMUWRPSQ.js";
38
39
  import {
39
40
  BuildError,
@@ -45,7 +46,7 @@ import {
45
46
  messageOf,
46
47
  printError,
47
48
  red
48
- } from "./chunk-R7PBREXL.js";
49
+ } from "./chunk-YNJNMQWU.js";
49
50
  import {
50
51
  isInside,
51
52
  realPath,
@@ -3,6 +3,7 @@ const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  canonicalTag,
5
5
  canonicalText,
6
+ canonicalUrl,
6
7
  compare,
7
8
  compareRuns,
8
9
  diffJson,
@@ -17,21 +18,22 @@ import {
17
18
  tokens,
18
19
  withoutFingerprints,
19
20
  withoutImageIds
20
- } from "./chunk-RGYJQYW3.js";
21
+ } from "./chunk-HDKU6LRI.js";
21
22
  import "./chunk-P2WS4RM4.js";
22
- import "./chunk-4B3N44SN.js";
23
- import "./chunk-GWWA5Y3X.js";
24
- import "./chunk-EVFNYUTR.js";
23
+ import "./chunk-UHRBPZ4A.js";
24
+ import "./chunk-ULCT3PAV.js";
25
+ import "./chunk-6U5VIQVY.js";
25
26
  import "./chunk-DDV6JEC2.js";
26
27
  import "./chunk-FVZ5JBRI.js";
27
- import "./chunk-UU43WIZG.js";
28
+ import "./chunk-FJML7INB.js";
28
29
  import "./chunk-CMUWRPSQ.js";
29
- import "./chunk-R7PBREXL.js";
30
+ import "./chunk-YNJNMQWU.js";
30
31
  import "./chunk-VJWQSYEG.js";
31
32
  import "./chunk-I3PS26CI.js";
32
33
  export {
33
34
  canonicalTag,
34
35
  canonicalText,
36
+ canonicalUrl,
35
37
  compare,
36
38
  compareRuns,
37
39
  diffJson,
@@ -2,28 +2,28 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  write
5
- } from "./chunk-LLOA3QXV.js";
5
+ } from "./chunk-FENJHLNM.js";
6
6
  import {
7
7
  loadConfig,
8
8
  schemaTypes
9
- } from "./chunk-DOHOKUGB.js";
10
- import "./chunk-GWWA5Y3X.js";
11
- import "./chunk-EVFNYUTR.js";
9
+ } from "./chunk-VILOEVK7.js";
10
+ import "./chunk-ULCT3PAV.js";
11
+ import "./chunk-6U5VIQVY.js";
12
12
  import "./chunk-AD3HAW3W.js";
13
13
  import {
14
14
  types
15
15
  } from "./chunk-YCOTX2VM.js";
16
16
  import "./chunk-DDV6JEC2.js";
17
- import "./chunk-RY3KLUQ3.js";
17
+ import "./chunk-6OUCRDYI.js";
18
+ import "./chunk-SPIFZBIW.js";
18
19
  import "./chunk-FVZ5JBRI.js";
19
- import "./chunk-Z3XH4KWX.js";
20
- import "./chunk-UU43WIZG.js";
21
- import "./chunk-57HLSKZS.js";
20
+ import "./chunk-FJML7INB.js";
21
+ import "./chunk-4AZFCSGJ.js";
22
22
  import "./chunk-CMUWRPSQ.js";
23
23
  import {
24
24
  messageOf,
25
25
  red
26
- } from "./chunk-R7PBREXL.js";
26
+ } from "./chunk-YNJNMQWU.js";
27
27
  import "./chunk-VJWQSYEG.js";
28
28
  import "./chunk-I3PS26CI.js";
29
29
 
@@ -3,14 +3,14 @@ const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  require_nunjucks,
5
5
  safe
6
- } from "./chunk-RY3KLUQ3.js";
6
+ } from "./chunk-6OUCRDYI.js";
7
7
  import {
8
8
  BuildError,
9
9
  isPlainObject,
10
10
  parseYaml,
11
11
  sourceDateEpoch,
12
12
  toDate
13
- } from "./chunk-R7PBREXL.js";
13
+ } from "./chunk-YNJNMQWU.js";
14
14
  import {
15
15
  compareText
16
16
  } from "./chunk-VJWQSYEG.js";
@@ -3405,7 +3405,9 @@ var TABLE = [
3405
3405
  { word: "server", kind: "command", alias: true, from: ["Hugo", "Hexo", "Jekyll"], ssqch: "serve", say: SERVE, more: "ssqch docs serve" },
3406
3406
  { word: "preview", kind: "command", alias: true, from: ["Astro", "VitePress"], ssqch: "serve --built", say: "Serving a production build as it is, without building or reloading, is `ssqch serve --built`.", more: "ssqch docs serve" },
3407
3407
  { word: "watch", kind: "command", alias: true, from: [], ssqch: "serve", say: SERVE, more: "ssqch docs serve" },
3408
- { word: "check", kind: "command", alias: false, from: ["Zola", "Astro"], ssqch: "build", say: "`ssqch build` checks as it builds: content schemas on every build, and internal links with `linksPlugin()`.", more: 'ssqch docs "Content schemas"' },
3408
+ // ssqch's own old name (0.12 and before): a rename replaces it, so it's refused with the new one.
3409
+ { word: "inspect", kind: "command", alias: false, from: [], ssqch: "trace", say: "`ssqch inspect` is `ssqch trace` now, with the same options and JSON: it follows a page's values back through the data cascade.", more: "ssqch trace --help" },
3410
+ { word: "check", kind: "command", alias: false, from: ["Zola", "Astro"], ssqch: "build", say: "`ssqch build` checks as it builds: content schemas on every build, and internal links with `linksPlugin()`. `ssqch patrol` checks a build for what agents and crawlers read.", more: 'ssqch docs "Content schemas"' },
3409
3411
  { word: "clean", kind: "command", alias: false, from: ["Hexo", "Jekyll", "Gatsby"], ssqch: "leaveNoTrace", say: "ssqch has no clean command: `leaveNoTrace: true` in the config deletes what an earlier build wrote and this one didn't.", more: "ssqch docs leaveNoTrace" },
3410
3412
  { word: "generate", kind: "command", alias: true, from: ["Hexo"], ssqch: "build", say: "To build the site: `ssqch build`.", more: "ssqch docs build" },
3411
3413
  { word: "version", kind: "command", alias: false, from: ["Hugo"], ssqch: "--version", say: "The version is `ssqch --version`.", more: "ssqch --help" },
@@ -3438,6 +3440,7 @@ var TABLE = [
3438
3440
  { word: "baseURL", kind: "config", alias: false, from: ["Hugo"], ssqch: "base", say: "ssqch's `base` is the path only (base: \"/repo/\"); the site's full URL goes in your data, for sitemapPlugin({ url }).", more: "ssqch docs base" },
3439
3441
  { word: "title", kind: "config", alias: false, from: ["Hugo", "Zola", "Jekyll"], ssqch: "data", say: "The site's title is data: put it in `_data/site.json` and use `site.title` in templates.", more: "ssqch docs data" },
3440
3442
  { word: "addPassthroughCopy", kind: "config", alias: false, from: ["Eleventy"], ssqch: "passthrough", say: 'In ssqch it\'s `passthrough`: passthrough: ["src/fonts", { "src/static": "static" }].', more: "ssqch docs passthrough" },
3443
+ { word: "clean", kind: "config", alias: false, from: [], ssqch: "leaveNoTrace", say: "ssqch calls it `leaveNoTrace`: leaveNoTrace: true deletes what an earlier build wrote and this one didn't.", more: "ssqch docs leaveNoTrace" },
3441
3444
  { word: "addFilter", kind: "config", alias: false, from: ["Eleventy"], ssqch: "filters", say: "In ssqch it's `filters`: filters: { shout: (s) => s.toUpperCase() }.", more: "ssqch docs filters" },
3442
3445
  { word: "addShortcode", kind: "config", alias: false, from: ["Eleventy"], ssqch: "filters", say: "A shortcode is a function in `filters`: filters: { year: () => String(new Date().getFullYear()) }.", more: "ssqch docs filters" },
3443
3446
  { word: "addCollection", kind: "config", alias: false, from: ["Eleventy"], ssqch: "collections", say: 'In ssqch it\'s `collections`: collections: { posts: (pages) => pages.byTag("post") }.', more: "ssqch docs collections" },
@@ -3459,6 +3462,8 @@ var TABLE = [
3459
3462
  { word: "getPreviousCollectionItem", kind: "filter", alias: true, from: ["Eleventy"], ssqch: "navPager", say: "`collection | getPreviousCollectionItem(page)` works: it's `navPager(collection, page.url).previous`, which gives `previous` and `next` at once.", more: "ssqch docs navPager" },
3460
3463
  { word: "getNextCollectionItem", kind: "filter", alias: true, from: ["Eleventy"], ssqch: "navPager", say: "`collection | getNextCollectionItem(page)` works: it's `navPager(collection, page.url).next`, which gives `previous` and `next` at once.", more: "ssqch docs navPager" },
3461
3464
  { word: "slug", kind: "filter", alias: false, from: ["Eleventy"], ssqch: "slugify", say: "ssqch's is `slugify`, which differs: Eleventy's `slug` (the `slugify` npm package) keeps `.` and some punctuation, so `Node.js` is `node.js` there and `node-js` in ssqch. To keep old URLs, define `slug` in `filters` with that package: slug: (s) => slugify(String(s), { lower: true }).", more: "ssqch docs slugify" },
3465
+ { word: "rssDate", kind: "filter", alias: true, from: ["Eleventy"], ssqch: "dateToRfc3339", say: "With `rssPlugin()` it's `dateToRfc3339`: {{ post.date | dateToRfc3339 }}.", more: "ssqch docs rssPlugin" },
3466
+ { word: "rssLastUpdatedDate", kind: "filter", alias: true, from: ["Eleventy"], ssqch: "getNewestCollectionItemDate", say: "With `rssPlugin()` it's `getNewestCollectionItemDate`, then `dateToRfc3339`: {{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}.", more: "ssqch docs rssPlugin" },
3462
3467
  { word: "absolute_url", kind: "filter", alias: false, from: ["Jekyll"], ssqch: "absoluteUrl", say: '`absoluteUrl(url, base)` comes with `rssPlugin()` from "ssqch/rss".', more: "ssqch docs absoluteUrl" },
3463
3468
  { word: "markdownify", kind: "filter", alias: true, from: ["Jekyll", "Hugo"], ssqch: "markdown", say: 'ssqch\'s function is `markdown(text)` (or `markdown(text, "inline")`).', more: "ssqch docs markdown" },
3464
3469
  { word: "jsonify", kind: "filter", alias: false, from: ["Jekyll"], ssqch: "dump", say: "`jsonify` works in Liquid templates; in Jinja it's `tojson`, and in Nunjucks `dump`.", more: 'ssqch docs "Jinja and Nunjucks"' },
@@ -3843,7 +3848,6 @@ var isPlainObject = (v) => {
3843
3848
  const proto = Object.getPrototypeOf(v);
3844
3849
  return proto === Object.prototype || proto === null;
3845
3850
  };
3846
- var frontMatterSettings = { trimAfter: false };
3847
3851
  function parseFrontMatter(src) {
3848
3852
  let format;
3849
3853
  let fence;
@@ -3872,7 +3876,7 @@ function parseFrontMatter(src) {
3872
3876
  const next = newline === -1 ? rest.length : newline + 1;
3873
3877
  if (rest.slice(offset, next).trimEnd() === fence) {
3874
3878
  const text = rest.slice(0, offset);
3875
- const body = frontMatterSettings.trimAfter ? rest.slice(next).replace(/^(?:[ \t]*\r?\n)+/, "") : rest.slice(next);
3879
+ const body = rest.slice(next);
3876
3880
  if (format === "json") {
3877
3881
  let value;
3878
3882
  try {
@@ -4413,7 +4417,6 @@ export {
4413
4417
  buildTime,
4414
4418
  sourceDateEpoch,
4415
4419
  isPlainObject,
4416
- frontMatterSettings,
4417
4420
  parseFrontMatter,
4418
4421
  parseYaml,
4419
4422
  tomlReason,
@@ -4459,4 +4462,4 @@ export {
4459
4462
  describe,
4460
4463
  printError
4461
4464
  };
4462
- /*! For license information please see chunk-R7PBREXL.js.LEGAL.txt */
4465
+ /*! For license information please see chunk-YNJNMQWU.js.LEGAL.txt */
@@ -6,30 +6,31 @@ import {
6
6
  build,
7
7
  edgeCodeMentionsForTest,
8
8
  inEdgeCode,
9
- inspectPages,
10
9
  runCommand,
11
- sameContentsForTest
12
- } from "./chunk-JX43SJHU.js";
13
- import "./chunk-L3K7MMFC.js";
14
- import "./chunk-DZ5F5XSI.js";
10
+ sameContentsForTest,
11
+ tracePages
12
+ } from "./chunk-6FY77I4M.js";
13
+ import "./chunk-YA23NDMW.js";
14
+ import "./chunk-V3G2QGL3.js";
15
15
  import {
16
16
  commandLine,
17
17
  toolPath
18
18
  } from "./chunk-4Q6WMTER.js";
19
- import "./chunk-4B3N44SN.js";
20
- import "./chunk-DOHOKUGB.js";
21
- import "./chunk-GWWA5Y3X.js";
22
- import "./chunk-EVFNYUTR.js";
19
+ import "./chunk-UHRBPZ4A.js";
20
+ import "./chunk-25WERNDD.js";
21
+ import "./chunk-VILOEVK7.js";
22
+ import "./chunk-ULCT3PAV.js";
23
+ import "./chunk-6U5VIQVY.js";
23
24
  import "./chunk-AD3HAW3W.js";
24
25
  import "./chunk-YCOTX2VM.js";
25
26
  import "./chunk-DDV6JEC2.js";
26
- import "./chunk-RY3KLUQ3.js";
27
+ import "./chunk-6OUCRDYI.js";
28
+ import "./chunk-SPIFZBIW.js";
27
29
  import "./chunk-FVZ5JBRI.js";
28
- import "./chunk-Z3XH4KWX.js";
29
- import "./chunk-UU43WIZG.js";
30
- import "./chunk-57HLSKZS.js";
30
+ import "./chunk-FJML7INB.js";
31
+ import "./chunk-4AZFCSGJ.js";
31
32
  import "./chunk-CMUWRPSQ.js";
32
- import "./chunk-R7PBREXL.js";
33
+ import "./chunk-YNJNMQWU.js";
33
34
  import "./chunk-VJWQSYEG.js";
34
35
  import "./chunk-I3PS26CI.js";
35
36
  export {
@@ -39,8 +40,8 @@ export {
39
40
  commandLine,
40
41
  edgeCodeMentionsForTest,
41
42
  inEdgeCode,
42
- inspectPages,
43
43
  runCommand,
44
44
  sameContentsForTest,
45
- toolPath
45
+ toolPath,
46
+ tracePages
46
47
  };
package/lib/cli.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
+ import {
4
+ BUILDER
5
+ } from "./chunk-ER72RPD6.js";
3
6
  import {
4
7
  Printed,
5
8
  UsageError,
6
9
  parse
7
10
  } from "./chunk-RIAOXEXC.js";
8
- import {
9
- BUILDER
10
- } from "./chunk-JUALMFW3.js";
11
11
  import {
12
12
  DEFAULT_ENGINE
13
- } from "./chunk-LLOA3QXV.js";
13
+ } from "./chunk-FENJHLNM.js";
14
14
  import {
15
15
  VERSION
16
16
  } from "./chunk-AD3HAW3W.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-DDV6JEC2.js";
26
26
  import {
27
27
  describeThrown
28
- } from "./chunk-57HLSKZS.js";
28
+ } from "./chunk-4AZFCSGJ.js";
29
29
  import {
30
30
  prettyJson,
31
31
  quoted
@@ -50,7 +50,7 @@ import {
50
50
  toJson2,
51
51
  warn,
52
52
  warning
53
- } from "./chunk-R7PBREXL.js";
53
+ } from "./chunk-YNJNMQWU.js";
54
54
  import {
55
55
  isDir,
56
56
  relative
@@ -107,11 +107,11 @@ var COMMANDS = [
107
107
  afterHelp: 'The blueprint is named after the page\'s folder (_blueprints/posts.md for posts/), then `default`.\nIts body is copied as it is; only front matter keys are filled in. Nothing is overwritten.\n\n ssqch new posts/pine-cones.md\n ssqch new posts --title "Pine cones" (named like the other pages in posts/)\n ssqch new docs/guides/install.md --set order=3 --set draft=true'
108
108
  },
109
109
  {
110
- name: "inspect",
111
- about: "Show where a page comes from, and which level of the data cascade set each value",
110
+ name: "trace",
111
+ about: "Follow a page's tracks: where it comes from, and which level of the data cascade set each value",
112
112
  options: [{ long: "field", value: "NAME", help: "One field of its data, in full, with every level that set it (a dotted path reaches inside: hero.alt)" }, FORMAT],
113
113
  positionals: [{ name: "PAGE", help: "The page: its URL (/about/), or its template's path", required: true }],
114
- afterHelp: "The site is read as a build reads it, up to rendering: beforeBuild hooks run (data can depend on them),\nbut no page is rendered or written, and afterBuild hooks don't run. Standard output is only the report.\n\n ssqch inspect /guides/install/\n ssqch inspect src/guides/install.md --field title\n ssqch inspect /guides/install/ --field hero.alt --format json"
114
+ afterHelp: "The site is read as a build reads it, up to rendering: beforeBuild hooks run (data can depend on them),\nbut no page is rendered or written, and afterBuild hooks don't run. Standard output is only the report.\n\n ssqch trace /guides/install/\n ssqch trace src/guides/install.md --field title\n ssqch trace /guides/install/ --field hero.alt --format json"
115
115
  },
116
116
  {
117
117
  name: "completions",
@@ -145,6 +145,13 @@ var COMMANDS = [
145
145
  positionals: [{ name: "DIR", help: "The build folder (default: the site's output folder)", required: false, path: true }],
146
146
  afterHelp: "It reads a build folder, so build first:\n\n ssqch build\n ssqch footprint (the site's output folder)\n ssqch footprint dist-before (any build)\n ssqch footprint --top 20 --format json"
147
147
  },
148
+ {
149
+ name: "patrol",
150
+ about: "Check a build for what agents and crawlers read: robots.txt, the sitemap, llms.txt, Markdown copies, headings and descriptions",
151
+ options: [FORMAT],
152
+ positionals: [{ name: "DIR", help: "The build folder (default: the site's output folder)", required: false, path: true }],
153
+ afterHelp: "It reads a build folder, any generator's, so build first:\n\n ssqch build\n ssqch patrol (the site's output folder)\n ssqch patrol _site (another generator's build, before a move)\n ssqch patrol --format json\n\nEach warning has a code (`ssqch docs \"what patrol checks\"` says what each means). Exits with 0 when it found nothing, 1 when\nit warned, and 2 on an error."
154
+ },
148
155
  {
149
156
  name: "init",
150
157
  about: "Create a starter site (config, layout, five posts, data and editor types)",
@@ -358,29 +365,30 @@ async function main(argv) {
358
365
  `);
359
366
  return 1;
360
367
  }
361
- if (command === "baseline") return (await import("./chunk-RFREB3SI.js")).runBaseline({ root: value("root") ?? ".", command: cli.positionals.join(" "), from: value("from") ?? "_site", runs: Number(value("runs") ?? "3"), commit: value("commit"), to: value("to") ?? ".cache/ssqch/baseline/ref", link: [cli.options.link ?? []].flat(), patch: value("patch"), copyInstalls: flag("copy-installs"), quiet: flag("quiet") });
362
- if (command === "scout") return (await import("./chunk-N3IZ44XY.js")).runScout(cli.positionals[0] ?? ".", { from: value("from"), format: value("format") === "json" ? "json" : "text", writeDraft: flag("write-draft"), patch: value("patch"), compare: flag("compare") ? value("reference") ?? "" : void 0 });
368
+ if (command === "baseline") return (await import("./chunk-F3JPNFCZ.js")).runBaseline({ root: value("root") ?? ".", command: cli.positionals.join(" "), from: value("from") ?? "_site", runs: Number(value("runs") ?? "3"), commit: value("commit"), to: value("to") ?? ".cache/ssqch/baseline/ref", link: [cli.options.link ?? []].flat(), patch: value("patch"), copyInstalls: flag("copy-installs"), quiet: flag("quiet") });
369
+ if (command === "scout") return (await import("./chunk-7U5GWTEH.js")).runScout(cli.positionals[0] ?? ".", { from: value("from"), format: value("format") === "json" ? "json" : "text", writeDraft: flag("write-draft"), patch: value("patch"), compare: flag("compare") ? value("reference") ?? "" : void 0 });
363
370
  switch (command) {
364
371
  case "init":
365
- return (await import("./chunk-VTYQ3JKL.js")).runInit({ dir: cli.positionals[0] ?? ".", starter: value("starter") ?? "site", engine: value("engine") ?? DEFAULT_ENGINE, quiet: flag("quiet") });
372
+ return (await import("./chunk-AIJNG6MJ.js")).runInit({ dir: cli.positionals[0] ?? ".", starter: value("starter") ?? "site", engine: value("engine") ?? DEFAULT_ENGINE, quiet: flag("quiet") });
366
373
  case "capabilities":
367
- return (await import("./chunk-FNNXRVSU.js")).runCapabilities(format, CAPABILITY_ORDER);
374
+ return (await import("./chunk-T5IUI7W7.js")).runCapabilities(format, CAPABILITY_ORDER);
368
375
  case "docs":
369
- return (await import("./chunk-3GROJ3TY.js")).runDocs(GRAMMAR, { query: cli.positionals, from: value("from"), format });
376
+ return (await import("./chunk-U2KEMVXO.js")).runDocs(GRAMMAR, { query: cli.positionals, from: value("from"), format });
370
377
  case "sighting":
371
- return (await import("./chunk-M2BBE2C3.js")).runSighting(path.resolve(value("root") ?? "."));
378
+ return (await import("./chunk-3ZTRIO6O.js")).runSighting(path.resolve(value("root") ?? "."));
372
379
  case "completions": {
373
380
  process.stdout.write(bundled(`completions/${cli.positionals[0]}`));
374
381
  return 0;
375
382
  }
376
383
  case "types": {
377
384
  routeConsole();
378
- return (await import("./chunk-52ROOMBZ.js")).runTypes({ root: value("root"), out: value("out") ?? "ssqch.d.ts" });
385
+ return (await import("./chunk-XYAWJTHM.js")).runTypes({ root: value("root"), out: value("out") ?? "ssqch.d.ts" });
379
386
  }
380
387
  }
381
388
  const many = (name) => Array.isArray(cli.options[name]) ? cli.options[name] : typeof cli.options[name] === "string" ? [cli.options[name]] : [];
382
389
  const top = Number(value("top") ?? "5");
383
390
  if (command === "diff") return runDiff(cli.positionals, { exact: flag("exact"), ignore: many("ignore"), only: many("only"), exclude: many("exclude"), ungrouped: flag("ungrouped"), text: flag("text"), lines: Number(value("lines") ?? "10"), format });
391
+ if (command === "patrol" && cli.positionals[0] !== void 0) return runPatrol(cli.positionals[0], cli.positionals[0], format);
384
392
  if (command === "footprint" && cli.positionals[0] !== void 0) {
385
393
  try {
386
394
  await runFootprint(cli.positionals[0], cli.positionals[0], top, format);
@@ -391,8 +399,8 @@ async function main(argv) {
391
399
  return 1;
392
400
  }
393
401
  }
394
- const inspecting = command === "inspect";
395
- if (inspecting) capture();
402
+ const tracing = command === "trace";
403
+ if (tracing) capture();
396
404
  const serving = command === "serve";
397
405
  const given = value("env") ?? process.env.SSQCH_ENV ?? process.env.NODE_ENV;
398
406
  const env = (given === void 0 ? void 0 : parseEnvironment(given)) ?? (serving ? "development" : "production");
@@ -401,15 +409,15 @@ async function main(argv) {
401
409
  const root = path.resolve(value("root") ?? ".");
402
410
  siteRoot = root;
403
411
  routeConsole();
404
- const makeConfig = async () => (await import("./chunk-7RGEWDLF.js")).loadConfig({ root, rootGiven: value("root") ?? ".", env, serving, quiet: flag("quiet") || inspecting, verbose: flag("verbose"), profile: command === "build" && flag("profile"), output: value("output"), base: value("base") });
412
+ const makeConfig = async () => (await import("./chunk-UZNUS7RP.js")).loadConfig({ root, rootGiven: value("root") ?? ".", env, serving, quiet: flag("quiet") || tracing, verbose: flag("verbose"), profile: command === "build" && flag("profile"), output: value("output"), base: value("base") });
405
413
  if (command === "new") return newPage(makeConfig, root, { path: cli.positionals[0], title: value("title"), date: value("date"), blueprint: value("blueprint"), set: cli.options.set ?? [], format });
406
414
  if (serving) {
407
- if (building) return (await import("./chunk-DXMDXHV7.js")).runBuilder(building, makeConfig, root);
415
+ if (building) return (await import("./chunk-WGAIE3DD.js")).runBuilder(building, makeConfig, root);
408
416
  const readyFile = value("ready-file") === void 0 ? void 0 : path.resolve(value("ready-file"));
409
417
  const options = { port: Number(value("port") ?? "8080"), readyFile, quiet: flag("quiet") };
410
418
  if (!flag("built")) {
411
419
  try {
412
- return await (await import("./chunk-6CSH757V.js")).serve(argv, options);
420
+ return await (await import("./chunk-DFJFHULZ.js")).serve(argv, options);
413
421
  } catch (e) {
414
422
  printError("error:", e, "build", new Locator(root));
415
423
  return 1;
@@ -423,7 +431,7 @@ async function main(argv) {
423
431
  return 1;
424
432
  }
425
433
  try {
426
- return await (await import("./chunk-6CSH757V.js")).serveBuilt(config2, options);
434
+ return await (await import("./chunk-DFJFHULZ.js")).serveBuilt(config2, options);
427
435
  } catch (e) {
428
436
  printError("error:", e, "build", locatorOf(config2));
429
437
  return 1;
@@ -443,16 +451,17 @@ async function main(argv) {
443
451
  return 1;
444
452
  }
445
453
  try {
446
- if (inspecting) {
447
- await runInspect(config, cli.positionals[0], value("field"), format);
454
+ if (tracing) {
455
+ await runTrace(config, cli.positionals[0], value("field"), format);
448
456
  return 0;
449
457
  }
458
+ if (command === "patrol") return runPatrol(shownDir(config, config.output), shownOutput(config), format);
450
459
  if (command === "footprint") {
451
460
  const dirs = dirsOf(config);
452
461
  await runFootprint(shownDir(config, config.output), shownOutput(config), top, format);
453
462
  return 0;
454
463
  }
455
- const [{ build }, { summary, profileText }] = await Promise.all([import("./chunk-AK7ZKSZP.js"), import("./chunk-L2IY4P6O.js")]);
464
+ const [{ build }, { summary, profileText }] = await Promise.all([import("./chunk-ZMG25MXF.js"), import("./chunk-GU7BBYWB.js")]);
456
465
  const report = await build(config);
457
466
  if (!config.quiet) process.stdout.write(summary(config, report));
458
467
  if (report.profile) process.stdout.write(profileText(report.profile));
@@ -471,7 +480,7 @@ async function newPage(makeConfig, root, command) {
471
480
  return 1;
472
481
  }
473
482
  try {
474
- (await import("./chunk-IIBZPHAW.js")).runNew(config, command);
483
+ (await import("./chunk-C2Q7JKFI.js")).runNew(config, command);
475
484
  return 0;
476
485
  } catch (e) {
477
486
  printError("error:", e, "build", locatorOf(config));
@@ -481,12 +490,12 @@ async function newPage(makeConfig, root, command) {
481
490
  var checkFormat = (format) => {
482
491
  if (format !== "text" && format !== "json") bail(`--format ${format}: use text or json`);
483
492
  };
484
- async function runInspect(config, target, name, format) {
493
+ async function runTrace(config, target, name, format) {
485
494
  checkFormat(format);
486
- const { field, fieldText, inspect, inspectionJson, inspectionText } = await import("./chunk-XVV7JJK7.js");
495
+ const { field, fieldText, trace, traceJson, traceText } = await import("./chunk-ENWDM2RW.js");
487
496
  let report;
488
497
  try {
489
- report = await inspect(config, target);
498
+ report = await trace(config, target);
490
499
  } finally {
491
500
  for (const found of takeWarnings()) process.stderr.write(`warn: ${found.message}
492
501
  `);
@@ -496,14 +505,14 @@ async function runInspect(config, target, name, format) {
496
505
  one = field(report, name);
497
506
  if (!one) bail(`${report.url ?? report.inputPath} has no \`${name.split(".")[0]}\` in its data (it has: ${report.fields.map((f) => f.name).join(", ")})`);
498
507
  }
499
- if (format === "json") process.stdout.write(prettyJson(inspectionJson(report, one)) + "\n");
500
- else process.stdout.write(one ? fieldText(one) : inspectionText(report));
508
+ if (format === "json") process.stdout.write(prettyJson(traceJson(report, one)) + "\n");
509
+ else process.stdout.write(one ? fieldText(one) : traceText(report));
501
510
  }
502
511
  async function runDiff(dirs, options) {
503
512
  const [before, after] = dirs;
504
513
  try {
505
514
  checkFormat(options.format);
506
- const [{ rustRegExp }, { globProblem, globToRegExp }, { compare, compareRuns, diffJson, diffText, isSame, runsJson, runsText }] = await Promise.all([import("./chunk-IAFM5ITE.js"), import("./chunk-5HEZ3WUQ.js"), import("./chunk-G3RFQDKO.js")]);
515
+ const [{ rustRegExp }, { globProblem, globToRegExp }, { compare, compareRuns, diffJson, diffText, isSame, runsJson, runsText }] = await Promise.all([import("./chunk-IAFM5ITE.js"), import("./chunk-TGSVSG2G.js"), import("./chunk-WUCRAV36.js")]);
507
516
  const ignore = options.ignore.map((pattern) => {
508
517
  try {
509
518
  return rustRegExp(pattern, "g");
@@ -546,9 +555,22 @@ async function runDiff(dirs, options) {
546
555
  return 2;
547
556
  }
548
557
  }
558
+ async function runPatrol(dir, shown, format) {
559
+ try {
560
+ checkFormat(format);
561
+ const { patrol, patrolJson, patrolText } = await import("./chunk-GM5SHCTU.js");
562
+ const report = patrol(dir);
563
+ process.stdout.write(format === "json" ? JSON.stringify(patrolJson(report, shown), null, 2) + "\n" : patrolText(report, shown));
564
+ return report.findings.length ? 1 : 0;
565
+ } catch (e) {
566
+ process.stderr.write(`${red("error:")} ${describeThrown(e, process.cwd())}
567
+ `);
568
+ return 2;
569
+ }
570
+ }
549
571
  async function runFootprint(dir, shown, top, format) {
550
572
  checkFormat(format);
551
- const { footprintJson, footprintText, measure } = await import("./chunk-JVT5ZRRH.js");
573
+ const { footprintJson, footprintText, measure } = await import("./chunk-OOKBXQAY.js");
552
574
  const measured = await measure(dir);
553
575
  if (format === "json") process.stdout.write(JSON.stringify(footprintJson(measured, shown, top), null, 2) + "\n");
554
576
  else process.stdout.write(footprintText(measured, shown, top));
@@ -572,7 +594,7 @@ async function buildJson(makeConfig, root, env) {
572
594
  const dirs = dirsOf(config);
573
595
  out.output = shownOutput(config);
574
596
  try {
575
- const report = await (await import("./chunk-AK7ZKSZP.js")).build(config);
597
+ const report = await (await import("./chunk-ZMG25MXF.js")).build(config);
576
598
  out.durationMs = ms(report.durationMs);
577
599
  out.pages = { written: report.pagesWritten, templates: report.templates, bytes: report.pageBytes, new: report.pagesNew ?? null, gone: report.pagesGone ?? null };
578
600
  out.copied = { files: report.filesCopied, unchanged: report.filesUnchanged, bytes: report.passthroughBytes };
package/lib/elements.js CHANGED
@@ -2,30 +2,30 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  Options
5
- } from "./chunk-MOLTDO5A.js";
5
+ } from "./chunk-SNQOHNXE.js";
6
6
  import {
7
7
  BUILTINS,
8
8
  debugString,
9
9
  rewriteHtml,
10
10
  withBase
11
- } from "./chunk-DOHOKUGB.js";
12
- import "./chunk-GWWA5Y3X.js";
11
+ } from "./chunk-VILOEVK7.js";
12
+ import "./chunk-ULCT3PAV.js";
13
13
  import {
14
14
  count
15
- } from "./chunk-EVFNYUTR.js";
15
+ } from "./chunk-6U5VIQVY.js";
16
16
  import "./chunk-AD3HAW3W.js";
17
17
  import "./chunk-YCOTX2VM.js";
18
18
  import "./chunk-DDV6JEC2.js";
19
- import "./chunk-RY3KLUQ3.js";
19
+ import "./chunk-6OUCRDYI.js";
20
+ import "./chunk-SPIFZBIW.js";
20
21
  import "./chunk-FVZ5JBRI.js";
21
- import "./chunk-Z3XH4KWX.js";
22
- import "./chunk-UU43WIZG.js";
23
- import "./chunk-57HLSKZS.js";
22
+ import "./chunk-FJML7INB.js";
23
+ import "./chunk-4AZFCSGJ.js";
24
24
  import "./chunk-CMUWRPSQ.js";
25
25
  import {
26
26
  bail,
27
27
  context
28
- } from "./chunk-R7PBREXL.js";
28
+ } from "./chunk-YNJNMQWU.js";
29
29
  import {
30
30
  compareText,
31
31
  displayPath,
@@ -0,0 +1,36 @@
1
+ import { createRequire as __ssqchCreateRequire } from "node:module";
2
+ const require = __ssqchCreateRequire(import.meta.url);
3
+ import {
4
+ Options
5
+ } from "./chunk-SNQOHNXE.js";
6
+ import {
7
+ BUILTINS
8
+ } from "./chunk-VILOEVK7.js";
9
+ import "./chunk-ULCT3PAV.js";
10
+ import "./chunk-6U5VIQVY.js";
11
+ import "./chunk-AD3HAW3W.js";
12
+ import "./chunk-YCOTX2VM.js";
13
+ import "./chunk-DDV6JEC2.js";
14
+ import {
15
+ applyMarkdownOptions
16
+ } from "./chunk-6OUCRDYI.js";
17
+ import "./chunk-SPIFZBIW.js";
18
+ import "./chunk-FVZ5JBRI.js";
19
+ import "./chunk-FJML7INB.js";
20
+ import "./chunk-4AZFCSGJ.js";
21
+ import "./chunk-CMUWRPSQ.js";
22
+ import "./chunk-YNJNMQWU.js";
23
+ import "./chunk-VJWQSYEG.js";
24
+ import "./chunk-I3PS26CI.js";
25
+
26
+ // src/modules/from-hugo.ts
27
+ function fromHugo(options = {}) {
28
+ return { name: "fromHugo", builtin: "ssqch/from-hugo", options };
29
+ }
30
+ BUILTINS.set("ssqch/from-hugo", (config, given) => {
31
+ new Options(given, []);
32
+ if (!config.markdownGiven.has("shortcodes")) applyMarkdownOptions(config.markdown, { shortcodes: "hugo" }, "module");
33
+ });
34
+ export {
35
+ fromHugo
36
+ };
@@ -0,0 +1,41 @@
1
+ import { createRequire as __ssqchCreateRequire } from "node:module";
2
+ const require = __ssqchCreateRequire(import.meta.url);
3
+ import {
4
+ Options
5
+ } from "./chunk-SNQOHNXE.js";
6
+ import {
7
+ BUILTINS
8
+ } from "./chunk-VILOEVK7.js";
9
+ import "./chunk-ULCT3PAV.js";
10
+ import "./chunk-6U5VIQVY.js";
11
+ import "./chunk-AD3HAW3W.js";
12
+ import "./chunk-YCOTX2VM.js";
13
+ import "./chunk-DDV6JEC2.js";
14
+ import {
15
+ applyMarkdownOptions
16
+ } from "./chunk-6OUCRDYI.js";
17
+ import "./chunk-SPIFZBIW.js";
18
+ import "./chunk-FVZ5JBRI.js";
19
+ import "./chunk-FJML7INB.js";
20
+ import "./chunk-4AZFCSGJ.js";
21
+ import "./chunk-CMUWRPSQ.js";
22
+ import "./chunk-YNJNMQWU.js";
23
+ import "./chunk-VJWQSYEG.js";
24
+ import "./chunk-I3PS26CI.js";
25
+
26
+ // src/modules/from-jekyll.ts
27
+ function fromJekyll(options = {}) {
28
+ return { name: "fromJekyll", builtin: "ssqch/from-jekyll", options };
29
+ }
30
+ var KRAMDOWN_DEFAULTS = { htmlMarkdown: "kramdown", headingIds: "kramdown", smartPunctuation: true, autolinks: false };
31
+ BUILTINS.set("ssqch/from-jekyll", (config, given) => {
32
+ const o = new Options(given, ["templates", "kramdown"]);
33
+ if (o.bool("kramdown") ?? true) {
34
+ const own = Object.fromEntries(Object.entries(KRAMDOWN_DEFAULTS).filter(([key]) => !config.markdownGiven.has(key)));
35
+ if (Object.keys(own).length) applyMarkdownOptions(config.markdown, own, "module");
36
+ }
37
+ if (o.bool("templates") ?? true) config.jekyllTemplates = true;
38
+ });
39
+ export {
40
+ fromJekyll
41
+ };