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
@@ -5,6 +5,10 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>{% if title %}{{ title }} | {% endif %}{{ site.name }}</title>
7
7
  <meta name="description" content="{{ description or site.description }}">
8
+ <link rel="canonical" href="{{ site.url }}{{ page.url }}">
9
+ {# For agents: the page as Markdown and the site's map (llmsPlugin() in ssqch.config.js). #}
10
+ {% if markdownCopy(page.url) %}<link rel="alternate" type="text/markdown" href="{{ markdownCopy(page.url) }}">{% endif %}
11
+ <link rel="describedby" href="/llms.txt">
8
12
  <meta name="generator" content="{{ ssqch.generator }}">
9
13
  <link rel="stylesheet" href="/highlight.css">
10
14
  <link rel="stylesheet" href="/assets/docs.css">
@@ -17,6 +17,10 @@ sidebar: true
17
17
  {{ content }}
18
18
 
19
19
  <footer class="page-footer">
20
+ {% set copy = markdownCopy(page.url) %}
21
+ {% if copy %}
22
+ <p class="page-markdown"><a href="{{ copy }}">View as Markdown</a> <button type="button" data-copy-markdown="{{ copy }}" hidden>Copy as Markdown</button></p>
23
+ {% endif %}
20
24
  {% if site.editUrl %}
21
25
  <p><a href="{{ site.editUrl }}{{ page.inputPath | replace('./', '') }}">Edit this page</a></p>
22
26
  {% endif %}
@@ -237,6 +237,10 @@ summary { font-weight: 600; cursor: pointer; }
237
237
  .tabs [role="tablist"] ~ .tab { border-top: 0; }
238
238
 
239
239
  .page-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); }
240
+ /* The page as Markdown, for agents: a link, and a button docs.js turns on. */
241
+ .page-markdown { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; }
242
+ .page-markdown button { padding: 0.25rem 0.7rem; border: 1px solid var(--muted); border-radius: 0.375rem; background: none; color: var(--text); font: inherit; cursor: pointer; }
243
+ .page-markdown button:hover { background: var(--selected); }
240
244
  .pager { display: flex; justify-content: space-between; gap: 1rem; }
241
245
  .footnotes { margin-top: 2.5rem; font-size: 0.9rem; color: var(--muted); }
242
246
 
@@ -65,3 +65,20 @@ const { PagefindUI } = /** @type {any} */ (window);
65
65
  if (PagefindUI && document.getElementById("search")) {
66
66
  new PagefindUI({ element: "#search", showSubResults: true });
67
67
  }
68
+
69
+ // Copy as Markdown: the page's Markdown copy (llmsPlugin() writes it), for pasting into a chat
70
+ // with an agent. The button stays hidden where there's no clipboard to copy to.
71
+ for (const button of document.querySelectorAll("[data-copy-markdown]")) {
72
+ if (!navigator.clipboard) continue;
73
+ button.hidden = false;
74
+ button.addEventListener("click", async () => {
75
+ try {
76
+ const response = await fetch(button.dataset.copyMarkdown);
77
+ await navigator.clipboard.writeText(await response.text());
78
+ button.textContent = "Copied";
79
+ } catch {
80
+ button.textContent = "Couldn't copy";
81
+ }
82
+ setTimeout(() => { button.textContent = "Copy as Markdown"; }, 2000);
83
+ });
84
+ }
@@ -1,8 +1,14 @@
1
1
  // A documentation site. `ssqch serve` serves it with live reload, and
2
2
  // `ssqch build` builds it into dist/. ssqch.d.ts gives your editor the types.
3
- import { defineConfig } from "ssqch";
3
+ import { defineConfig, readData } from "ssqch";
4
4
  import { linksPlugin } from "ssqch/links";
5
+ import { llmsPlugin } from "ssqch/llms";
5
6
  import { minifyPlugin } from "ssqch/minify";
7
+ import { robotsPlugin } from "ssqch/robots";
8
+ import { sitemapPlugin } from "ssqch/sitemap";
9
+
10
+ // The site's address, from src/_data/site.json: put yours there.
11
+ const { url } = readData("src/_data/site.json");
6
12
 
7
13
  // Search is Pagefind (https://pagefind.app), which indexes the built pages.
8
14
  // It's a program of its own that npx fetches, so it's opt-in:
@@ -35,6 +41,13 @@ export default defineConfig(({ env }) => ({
35
41
  plugins: [
36
42
  // Broken internal links (and anchors) fail a production build.
37
43
  linksPlugin({ ignore: ["/pagefind/"] }),
44
+ // What crawlers and agents read: sitemap.xml, robots.txt, and llms.txt with a
45
+ // Markdown copy of each page (each page links its copy). `ssqch patrol` checks them.
46
+ sitemapPlugin({ url }),
47
+ // `false` keeps that kind of AI crawler out: training (collecting pages to train
48
+ // models), search (AI search answers) or fetch (a page a person asked about).
49
+ robotsPlugin({ ai: { training: true, search: true, fetch: true } }),
50
+ llmsPlugin({ url }),
38
51
  env === "production" && minifyPlugin(),
39
52
  ],
40
53
  }));
package/lib/assets.js CHANGED
@@ -2,28 +2,28 @@ 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
  blake3Hex,
9
9
  rewriteHtml
10
- } from "./chunk-DOHOKUGB.js";
11
- import "./chunk-GWWA5Y3X.js";
12
- import "./chunk-EVFNYUTR.js";
10
+ } from "./chunk-VILOEVK7.js";
11
+ import "./chunk-ULCT3PAV.js";
12
+ import "./chunk-6U5VIQVY.js";
13
13
  import "./chunk-AD3HAW3W.js";
14
14
  import "./chunk-YCOTX2VM.js";
15
15
  import "./chunk-DDV6JEC2.js";
16
- import "./chunk-RY3KLUQ3.js";
16
+ import "./chunk-6OUCRDYI.js";
17
+ import "./chunk-SPIFZBIW.js";
17
18
  import "./chunk-FVZ5JBRI.js";
18
- import "./chunk-Z3XH4KWX.js";
19
- import "./chunk-UU43WIZG.js";
20
- import "./chunk-57HLSKZS.js";
19
+ import "./chunk-FJML7INB.js";
20
+ import "./chunk-4AZFCSGJ.js";
21
21
  import "./chunk-CMUWRPSQ.js";
22
22
  import {
23
23
  bail,
24
24
  warn,
25
25
  warning
26
- } from "./chunk-R7PBREXL.js";
26
+ } from "./chunk-YNJNMQWU.js";
27
27
  import {
28
28
  displayPath
29
29
  } from "./chunk-VJWQSYEG.js";
@@ -0,0 +1,112 @@
1
+ import { createRequire as __ssqchCreateRequire } from "node:module";
2
+ const require = __ssqchCreateRequire(import.meta.url);
3
+
4
+ // src/content.ts
5
+ var HEADING = /<h([1-6])(\s[^>]*)?>(.*?)<\/h[1-6]\s*>/gis;
6
+ var ID_ATTR = /(?:^|\s)id\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+))/i;
7
+ var TAG = /<(\/?)([A-Za-z][A-Za-z0-9-]*)([^>]*)>|<!--.*?-->/gs;
8
+ var HIDDEN = /\saria-hidden\s*=\s*["']?true|\sclass\s*=\s*["'][^"']*\bheader-anchor\b/i;
9
+ var CODE = /<!--.*?-->|<(pre|script|style|template|textarea)\b.*?<\/(?:pre|script|style|template|textarea)\s*>/gis;
10
+ var CODE_WITH_HEADING = /<code\b(?:(?!<\/code\s*>).)*?<h[1-6][\s>](?:(?!<\/code\s*>).)*<\/code\s*>/gis;
11
+ var VOID = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]);
12
+ function headings(html) {
13
+ if (!html.includes("<h") && !html.includes("<H")) return [];
14
+ const out = [];
15
+ for (const found of html.replace(CODE, "").replace(CODE_WITH_HEADING, "").matchAll(HEADING)) {
16
+ const id = ID_ATTR.exec(found[2] ?? "");
17
+ const value = id ? id[1] ?? id[2] ?? id[3] : void 0;
18
+ out.push({ level: Number(found[1]), id: value === void 0 ? void 0 : decodeEntities(value), text: htmlText(found[3]) });
19
+ }
20
+ return out;
21
+ }
22
+ function htmlText(html) {
23
+ let text = "";
24
+ let hidden = 0;
25
+ let last = 0;
26
+ for (const found of html.matchAll(TAG)) {
27
+ if (hidden === 0) text += html.slice(last, found.index);
28
+ last = found.index + found[0].length;
29
+ if (found[2] === void 0) continue;
30
+ const name = found[2].toLowerCase();
31
+ const attrs = found[3] ?? "";
32
+ if (VOID.has(name) || attrs.endsWith("/")) {
33
+ if (name === "br" && hidden === 0) text += " ";
34
+ continue;
35
+ }
36
+ if (found[1] === "/") hidden = Math.max(0, hidden - 1);
37
+ else if (hidden > 0 || HIDDEN.test(attrs)) hidden++;
38
+ }
39
+ if (hidden === 0) text += html.slice(last);
40
+ return splitWhitespace(decodeEntities(text)).join(" ");
41
+ }
42
+ function splitWhitespace(text) {
43
+ return text.split(/[\t-\r \u0085\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+/).filter((word) => word !== "");
44
+ }
45
+ var ENTITY = /&(#[0-9]{1,7}|#[xX][0-9A-Fa-f]{1,6}|[A-Za-z]+);/g;
46
+ var NAMED = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: "\xA0" };
47
+ function decodeEntities(s) {
48
+ if (!s.includes("&")) return s;
49
+ return s.replace(ENTITY, (whole, name) => {
50
+ if (Object.hasOwn(NAMED, name)) return NAMED[name];
51
+ if (name[0] !== "#") return whole;
52
+ const code = name[1] === "x" || name[1] === "X" ? Number.parseInt(name.slice(2), 16) : Number.parseInt(name.slice(1), 10);
53
+ return code <= 1114111 && !(code >= 55296 && code <= 57343) ? String.fromCodePoint(code) : whole;
54
+ });
55
+ }
56
+ function escapeText(s) {
57
+ return s.replace(/[&<>"]/g, (c) => c === "&" ? "&amp;" : c === "<" ? "&lt;" : c === ">" ? "&gt;" : "&quot;");
58
+ }
59
+ function escapeHtml(s) {
60
+ return s.replace(/[&<>"']/g, (c) => c === "&" ? "&amp;" : c === "<" ? "&lt;" : c === ">" ? "&gt;" : c === '"' ? "&quot;" : "&#39;");
61
+ }
62
+ function excerpt(html) {
63
+ const more = /<!--\s*more\s*-->/.exec(html);
64
+ if (more) return html.slice(0, more.index).trim();
65
+ return /<p(?:\s[^>]*)?>.*?<\/p>/is.exec(html)?.[0];
66
+ }
67
+ function toc(list, from, to, ordered, markup = {}) {
68
+ const tag = ordered ? "ol" : "ul";
69
+ const attr = (name, value) => value ? ` ${name}="${escapeHtml(value)}"` : "";
70
+ const open = (outer) => `<${tag}${outer ? attr("id", markup.id) + attr("class", markup.class) : attr("class", markup.sublistClass)}>`;
71
+ const link = attr("class", markup.linkClass);
72
+ const items = [];
73
+ for (const v of list) {
74
+ const h = v;
75
+ if (typeof h?.level !== "number") continue;
76
+ const level = Math.trunc(h.level);
77
+ const id = typeof h.id === "string" && h.id !== "" ? h.id : void 0;
78
+ if (id !== void 0 && level >= from && level <= to) items.push({ level, id, text: String(h.text) });
79
+ }
80
+ let out = "";
81
+ const stack = [];
82
+ for (const h of items) {
83
+ if (!stack.length) {
84
+ out += open(true);
85
+ stack.push(h.level);
86
+ } else {
87
+ while (stack.length > 1 && h.level < stack[stack.length - 1]) {
88
+ out += `</li></${tag}>`;
89
+ stack.pop();
90
+ }
91
+ if (h.level > stack[stack.length - 1]) {
92
+ out += open(false);
93
+ stack.push(h.level);
94
+ } else {
95
+ out += "</li>";
96
+ }
97
+ }
98
+ out += `<li${attr("class", markup.itemClass?.replaceAll("{level}", String(h.level)))}><a href="#${escapeHtml(h.id ?? "")}"${link}>${escapeText(h.text)}</a>`;
99
+ }
100
+ for (const _ of stack) out += `</li></${tag}>`;
101
+ return out;
102
+ }
103
+
104
+ export {
105
+ headings,
106
+ htmlText,
107
+ splitWhitespace,
108
+ decodeEntities,
109
+ escapeText,
110
+ excerpt,
111
+ toc
112
+ };
@@ -6,10 +6,10 @@ import {
6
6
  import {
7
7
  compareRuns,
8
8
  runsText
9
- } from "./chunk-RGYJQYW3.js";
9
+ } from "./chunk-HDKU6LRI.js";
10
10
  import {
11
11
  red
12
- } from "./chunk-R7PBREXL.js";
12
+ } from "./chunk-YNJNMQWU.js";
13
13
  import {
14
14
  compareText
15
15
  } from "./chunk-VJWQSYEG.js";
@@ -2,26 +2,27 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  OUTPUT_LIST
5
- } from "./chunk-JX43SJHU.js";
6
- import "./chunk-L3K7MMFC.js";
7
- import "./chunk-DZ5F5XSI.js";
5
+ } from "./chunk-6FY77I4M.js";
6
+ import "./chunk-YA23NDMW.js";
7
+ import "./chunk-V3G2QGL3.js";
8
8
  import "./chunk-4Q6WMTER.js";
9
- import "./chunk-4B3N44SN.js";
10
- import "./chunk-DOHOKUGB.js";
11
- import "./chunk-GWWA5Y3X.js";
9
+ import "./chunk-UHRBPZ4A.js";
10
+ import "./chunk-25WERNDD.js";
11
+ import "./chunk-VILOEVK7.js";
12
+ import "./chunk-ULCT3PAV.js";
12
13
  import {
13
14
  count
14
- } from "./chunk-EVFNYUTR.js";
15
+ } from "./chunk-6U5VIQVY.js";
15
16
  import "./chunk-AD3HAW3W.js";
16
17
  import "./chunk-YCOTX2VM.js";
17
18
  import "./chunk-DDV6JEC2.js";
18
- import "./chunk-RY3KLUQ3.js";
19
+ import "./chunk-6OUCRDYI.js";
20
+ import "./chunk-SPIFZBIW.js";
19
21
  import "./chunk-FVZ5JBRI.js";
20
- import "./chunk-Z3XH4KWX.js";
21
- import "./chunk-UU43WIZG.js";
22
- import "./chunk-57HLSKZS.js";
22
+ import "./chunk-FJML7INB.js";
23
+ import "./chunk-4AZFCSGJ.js";
23
24
  import "./chunk-CMUWRPSQ.js";
24
- import "./chunk-R7PBREXL.js";
25
+ import "./chunk-YNJNMQWU.js";
25
26
  import "./chunk-VJWQSYEG.js";
26
27
  import "./chunk-I3PS26CI.js";
27
28
 
@@ -38,8 +39,8 @@ var PHOTO = `
38
39
  || || / \\ ||
39
40
  || || / \\ ||
40
41
  `;
41
- function lastSiting(root, now) {
42
- const none = "No confirmed sitings here yet. `ssqch build` would be the first.";
42
+ function lastSighting(root, now) {
43
+ const none = "No confirmed sightings here yet. `ssqch build` would be the first.";
43
44
  let list;
44
45
  try {
45
46
  list = JSON.parse(fs.readFileSync(path.join(root, OUTPUT_LIST), "utf8")) ?? {};
@@ -61,17 +62,17 @@ function lastSiting(root, now) {
61
62
  const minutes = Math.max(0, Math.floor((now - newest) / 6e4));
62
63
  const unit = (n, name) => `${n} ${name}${n === 1 ? "" : "s"} ago`;
63
64
  const ago = minutes === 0 ? "just now" : minutes < 60 ? unit(minutes, "minute") : minutes < 1440 ? unit(Math.floor(minutes / 60), "hour") : unit(Math.floor(minutes / 1440), "day");
64
- return `Last confirmed siting: ${count(pages.length)} page${pages.length === 1 ? "" : "s"} in ${output}/, ${ago}.`;
65
+ return `Last confirmed sighting: ${count(pages.length)} page${pages.length === 1 ? "" : "s"} in ${output}/, ${ago}.`;
65
66
  }
66
67
  function runSighting(root) {
67
68
  process.stdout.write(`${PHOTO}
68
69
  Image quality meets cryptozoological standards.
69
70
 
70
- ${lastSiting(root, Date.now())}
71
+ ${lastSighting(root, Date.now())}
71
72
  `);
72
73
  return 0;
73
74
  }
74
75
  export {
75
- lastSiting,
76
+ lastSighting,
76
77
  runSighting
77
78
  };
@@ -2,7 +2,7 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  BuildError
5
- } from "./chunk-R7PBREXL.js";
5
+ } from "./chunk-YNJNMQWU.js";
6
6
  import {
7
7
  realPath
8
8
  } from "./chunk-VJWQSYEG.js";
@@ -15,7 +15,7 @@ import os from "node:os";
15
15
  import { registerHooks } from "node:module";
16
16
  import { fileURLToPath, pathToFileURL } from "node:url";
17
17
  var SELF = path.dirname(path.dirname(fileURLToPath(new URL("../src/modules.ts", import.meta.url).href)));
18
- var BUILT_IN = ["ssqch/image", "ssqch/rss", "ssqch/assets", "ssqch/links", "ssqch/sitemap", "ssqch/redirects", "ssqch/sass", "ssqch/elements", "ssqch/minify", "ssqch/llms", "ssqch/vue"];
18
+ var BUILT_IN = ["ssqch/image", "ssqch/rss", "ssqch/assets", "ssqch/links", "ssqch/sitemap", "ssqch/redirects", "ssqch/sass", "ssqch/elements", "ssqch/minify", "ssqch/llms", "ssqch/vue", "ssqch/robots", "ssqch/from-vitepress", "ssqch/from-mkdocs", "ssqch/from-jekyll", "ssqch/from-hugo"];
19
19
  var COMPILED = fs.existsSync(path.join(SELF, "lib", "ssqch.js"));
20
20
  var API = COMPILED ? pathToFileURL(path.join(SELF, "lib", "ssqch.js")).href : new URL("./exports/ssqch.ts", new URL("../src/modules.ts", import.meta.url).href).href;
21
21
  var builtInUrl = (specifier) => COMPILED ? pathToFileURL(path.join(SELF, "lib", `${specifier.slice(6)}.js`)) : new URL(`./exports/${specifier.slice(6)}.ts`, new URL("../src/modules.ts", import.meta.url).href);
@@ -2,7 +2,7 @@ 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
  addImagePlugin,
@@ -11,10 +11,10 @@ import {
11
11
  imageOptionsFor,
12
12
  meant,
13
13
  parseFormat
14
- } from "./chunk-DOHOKUGB.js";
14
+ } from "./chunk-VILOEVK7.js";
15
15
  import {
16
16
  bail
17
- } from "./chunk-R7PBREXL.js";
17
+ } from "./chunk-YNJNMQWU.js";
18
18
 
19
19
  // src/modules/image.ts
20
20
  import fs from "node:fs";
@@ -21,26 +21,28 @@ import {
21
21
  siteArgs,
22
22
  sitePath,
23
23
  tocOf
24
- } from "./chunk-L3K7MMFC.js";
24
+ } from "./chunk-YA23NDMW.js";
25
25
  import {
26
- builtinFilters,
27
- excerpt,
28
- headings
29
- } from "./chunk-DZ5F5XSI.js";
26
+ builtinFilters
27
+ } from "./chunk-V3G2QGL3.js";
30
28
  import {
31
29
  commandLine
32
30
  } from "./chunk-4Q6WMTER.js";
33
31
  import {
34
32
  measure,
35
33
  overBudget
36
- } from "./chunk-4B3N44SN.js";
34
+ } from "./chunk-UHRBPZ4A.js";
35
+ import {
36
+ excerpt,
37
+ headings
38
+ } from "./chunk-25WERNDD.js";
37
39
  import {
38
40
  checkPages,
39
41
  rewriteBase
40
- } from "./chunk-DOHOKUGB.js";
42
+ } from "./chunk-VILOEVK7.js";
41
43
  import {
42
44
  Profile
43
- } from "./chunk-EVFNYUTR.js";
45
+ } from "./chunk-6U5VIQVY.js";
44
46
  import {
45
47
  VERSION
46
48
  } from "./chunk-AD3HAW3W.js";
@@ -66,29 +68,29 @@ import {
66
68
  site,
67
69
  withPage,
68
70
  writeHighlightCss
69
- } from "./chunk-RY3KLUQ3.js";
70
- import {
71
- closest,
72
- closestPath
73
- } from "./chunk-FVZ5JBRI.js";
71
+ } from "./chunk-6OUCRDYI.js";
74
72
  import {
75
73
  globBase,
76
74
  globSet,
77
75
  globToRegExp,
78
76
  isGlob
79
- } from "./chunk-Z3XH4KWX.js";
77
+ } from "./chunk-SPIFZBIW.js";
78
+ import {
79
+ closest,
80
+ closestPath
81
+ } from "./chunk-FVZ5JBRI.js";
80
82
  import {
81
83
  ISSUES_URL,
82
84
  PASSED_THIS_TREE,
83
85
  SOMETHING_LARGE
84
- } from "./chunk-UU43WIZG.js";
86
+ } from "./chunk-FJML7INB.js";
85
87
  import {
86
88
  describeThrown,
87
89
  loadedFiles,
88
90
  settle,
89
91
  shownPath,
90
92
  watchSettle
91
- } from "./chunk-57HLSKZS.js";
93
+ } from "./chunk-4AZFCSGJ.js";
92
94
  import {
93
95
  BuildError,
94
96
  Diagnostics,
@@ -102,7 +104,6 @@ import {
102
104
  decodeText,
103
105
  error,
104
106
  find,
105
- frontMatterSettings,
106
107
  getPath,
107
108
  isCapturing,
108
109
  isPlainObject,
@@ -119,7 +120,7 @@ import {
119
120
  toDate,
120
121
  warn,
121
122
  warning
122
- } from "./chunk-R7PBREXL.js";
123
+ } from "./chunk-YNJNMQWU.js";
123
124
  import {
124
125
  comparePaths,
125
126
  compareText,
@@ -24168,7 +24169,6 @@ var Site = class {
24168
24169
  profile;
24169
24170
  constructor(config, keepLayers = false) {
24170
24171
  this.config = config;
24171
- frontMatterSettings.trimAfter = config.trimAfterFrontMatter;
24172
24172
  this.dirs = dirsOf(config);
24173
24173
  this.keepLayers = keepLayers;
24174
24174
  this.profile = new Profile(config.profile);
@@ -24232,6 +24232,7 @@ var Site = class {
24232
24232
  const pipeFilters = /* @__PURE__ */ new Map();
24233
24233
  for (const row of TABLE) {
24234
24234
  if (row.kind !== "filter" || !row.alias || config.filters.has(row.word)) continue;
24235
+ if (row.ssqch !== "base" && !globals.has(row.ssqch)) continue;
24235
24236
  const takesUrl = row.ssqch === "base";
24236
24237
  let warned = false;
24237
24238
  pipeFilters.set(row.word, (...args) => {
@@ -25343,7 +25344,7 @@ async function build(config) {
25343
25344
  if (config.profile) report.profile = site2.profile.report();
25344
25345
  return report;
25345
25346
  }
25346
- async function inspectPages(config) {
25347
+ async function tracePages(config) {
25347
25348
  const site2 = new Site(config, true);
25348
25349
  const { dirs } = site2;
25349
25350
  if (!isDir(dirs.input)) bail(`input directory ${shownDir(config, config.input)} does not exist`);
@@ -25437,6 +25438,7 @@ var Renderer = class {
25437
25438
  for (let i2 = from; i2 < tpl.engines.length; i2++) {
25438
25439
  const name = tpl.engines[i2];
25439
25440
  const engine = this.site.engines.get(name);
25441
+ if (name === "md" && page.url !== null) this.site.config.markdownSources?.set(page.url, content);
25440
25442
  let out2;
25441
25443
  try {
25442
25444
  out2 = engine.render(content, data2, ctx);
@@ -26205,7 +26207,7 @@ function recordOutputs(config, dirs, outputs, pagePaths) {
26205
26207
 
26206
26208
  export {
26207
26209
  build,
26208
- inspectPages,
26210
+ tracePages,
26209
26211
  inEdgeCode,
26210
26212
  edgeCodeMentionsForTest,
26211
26213
  asTextForTest,
@@ -26213,4 +26215,4 @@ export {
26213
26215
  runCommand,
26214
26216
  OUTPUT_LIST
26215
26217
  };
26216
- /*! For license information please see chunk-JX43SJHU.js.LEGAL.txt */
26218
+ /*! For license information please see chunk-6FY77I4M.js.LEGAL.txt */