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.
- package/bundled/completions/bash +66 -8
- package/bundled/completions/elvish +23 -4
- package/bundled/completions/fish +36 -25
- package/bundled/completions/powershell +25 -4
- package/bundled/completions/zsh +44 -10
- package/bundled/docs/agents.md +2 -2
- package/bundled/docs/build-summary.md +1 -1
- package/bundled/docs/comparing-builds.md +2 -2
- package/bundled/docs/configuring.md +3 -6
- package/bundled/docs/deploying.md +1 -1
- package/bundled/docs/field-guide.md +4 -4
- package/bundled/docs/github-pages.md +1 -0
- package/bundled/docs/index.md +1 -1
- package/bundled/docs/install.md +1 -1
- package/bundled/docs/known-gaps.md +1 -1
- package/bundled/docs/markdown.md +8 -12
- package/bundled/docs/nav.yml +5 -1
- package/bundled/docs/netlify.md +4 -2
- package/bundled/docs/patrol.md +48 -0
- package/bundled/docs/plugins.md +6 -6
- package/bundled/docs/robots.md +85 -0
- package/bundled/docs/seo.md +2 -38
- package/bundled/docs/serving-markdown.md +142 -0
- package/bundled/docs/template-languages.md +1 -1
- package/bundled/docs/templates.md +1 -1
- package/bundled/docs/trailheads/from-hugo.md +5 -3
- package/bundled/docs/trailheads/from-jekyll.md +54 -13
- package/bundled/docs/trailheads/from-mkdocs.md +15 -12
- package/bundled/docs/trailheads/from-vitepress.md +13 -11
- package/bundled/docs/trailheads.md +3 -3
- package/bundled/docs/where-values-come-from.md +5 -5
- package/bundled/docs/writing-plugins.md +69 -0
- package/bundled/ssqch.d.ts +118 -44
- package/bundled/starter/engines/index.edge +1 -0
- package/bundled/starter/engines/index.ejs +1 -0
- package/bundled/starter/engines/index.hbs +1 -0
- package/bundled/starter/engines/index.liquid +1 -0
- package/bundled/starter/engines/layout.edge +7 -0
- package/bundled/starter/engines/layout.ejs +4 -0
- package/bundled/starter/engines/layout.hbs +4 -0
- package/bundled/starter/engines/layout.liquid +4 -0
- package/bundled/starter/src/_data/site.json +1 -0
- package/bundled/starter/src/_includes/layout.jinja +4 -0
- package/bundled/starter/src/index.jinja +1 -0
- package/bundled/starter/ssqch.config.js +14 -1
- package/bundled/starter-docs/engines/edge/base.edge +7 -0
- package/bundled/starter-docs/engines/edge/doc.edge +4 -0
- package/bundled/starter-docs/engines/ejs/base.ejs +4 -0
- package/bundled/starter-docs/engines/ejs/doc.ejs +4 -0
- package/bundled/starter-docs/engines/hbs/base.hbs +4 -0
- package/bundled/starter-docs/engines/hbs/doc.hbs +3 -0
- package/bundled/starter-docs/engines/liquid/base.liquid +4 -0
- package/bundled/starter-docs/engines/liquid/doc.liquid +4 -0
- package/bundled/starter-docs/src/_data/site.json +1 -0
- package/bundled/starter-docs/src/_includes/base.jinja +4 -0
- package/bundled/starter-docs/src/_includes/doc.jinja +4 -0
- package/bundled/starter-docs/src/assets/docs.css +4 -0
- package/bundled/starter-docs/src/assets/docs.js +17 -0
- package/bundled/starter-docs/ssqch.config.js +14 -1
- package/lib/assets.js +9 -9
- package/lib/chunk-25WERNDD.js +112 -0
- package/lib/{chunk-4ZMNLWE4.js → chunk-2BJFGKOE.js} +2 -2
- package/lib/{chunk-M2BBE2C3.js → chunk-3ZTRIO6O.js} +18 -17
- package/lib/{chunk-57HLSKZS.js → chunk-4AZFCSGJ.js} +2 -2
- package/lib/{chunk-ULQHJ4TS.js → chunk-55WXDGO4.js} +3 -3
- package/lib/{chunk-JX43SJHU.js → chunk-6FY77I4M.js} +24 -22
- package/lib/{chunk-RY3KLUQ3.js → chunk-6OUCRDYI.js} +267 -202
- package/lib/{chunk-EVFNYUTR.js → chunk-6U5VIQVY.js} +5 -5
- package/lib/{chunk-N3IZ44XY.js → chunk-7U5GWTEH.js} +88 -54
- package/lib/{chunk-VTYQ3JKL.js → chunk-AIJNG6MJ.js} +2 -2
- package/lib/{chunk-IIBZPHAW.js → chunk-C2Q7JKFI.js} +8 -8
- package/lib/{chunk-6CSH757V.js → chunk-DFJFHULZ.js} +33 -8
- package/lib/{chunk-XVV7JJK7.js → chunk-ENWDM2RW.js} +40 -39
- package/lib/{chunk-JUALMFW3.js → chunk-ER72RPD6.js} +1 -1
- package/lib/{chunk-RFREB3SI.js → chunk-F3JPNFCZ.js} +7 -7
- package/lib/{chunk-LLOA3QXV.js → chunk-FENJHLNM.js} +3 -2
- package/lib/{chunk-UU43WIZG.js → chunk-FJML7INB.js} +4 -2
- package/lib/{chunk-IZCF4UH3.js → chunk-FQZDUDFK.js} +1 -1
- package/lib/chunk-GM5SHCTU.js +272 -0
- package/lib/{chunk-GVHQ37JE.js → chunk-GSNRAGKQ.js} +10 -5
- package/lib/{chunk-L2IY4P6O.js → chunk-GU7BBYWB.js} +3 -3
- package/lib/{chunk-RGYJQYW3.js → chunk-HDKU6LRI.js} +32 -5
- package/lib/{chunk-IQUGLVZY.js → chunk-K5WZ2VYK.js} +4 -4
- package/lib/{chunk-JVT5ZRRH.js → chunk-OOKBXQAY.js} +5 -5
- package/lib/{chunk-MOLTDO5A.js → chunk-SNQOHNXE.js} +1 -1
- package/lib/{chunk-Z3XH4KWX.js → chunk-SPIFZBIW.js} +1 -1
- package/lib/{chunk-FNNXRVSU.js → chunk-T5IUI7W7.js} +10 -10
- package/lib/{chunk-5HEZ3WUQ.js → chunk-TGSVSG2G.js} +2 -2
- package/lib/{chunk-3GROJ3TY.js → chunk-U2KEMVXO.js} +24 -17
- package/lib/{chunk-4B3N44SN.js → chunk-UHRBPZ4A.js} +3 -3
- package/lib/{chunk-GWWA5Y3X.js → chunk-ULCT3PAV.js} +1 -1
- package/lib/{chunk-7RGEWDLF.js → chunk-UZNUS7RP.js} +10 -8
- package/lib/{chunk-DZ5F5XSI.js → chunk-V3G2QGL3.js} +10 -105
- package/lib/{chunk-DOHOKUGB.js → chunk-VILOEVK7.js} +50 -26
- package/lib/{chunk-DXMDXHV7.js → chunk-WGAIE3DD.js} +15 -14
- package/lib/{chunk-G3RFQDKO.js → chunk-WUCRAV36.js} +8 -6
- package/lib/{chunk-52ROOMBZ.js → chunk-XYAWJTHM.js} +9 -9
- package/lib/{chunk-L3K7MMFC.js → chunk-YA23NDMW.js} +2 -2
- package/lib/{chunk-R7PBREXL.js → chunk-YNJNMQWU.js} +8 -5
- package/lib/{chunk-AK7ZKSZP.js → chunk-ZMG25MXF.js} +17 -16
- package/lib/cli.js +56 -34
- package/lib/elements.js +9 -9
- package/lib/from-hugo.js +36 -0
- package/lib/from-jekyll.js +41 -0
- package/lib/from-mkdocs.js +49 -0
- package/lib/from-vitepress.js +49 -0
- package/lib/image.js +10 -10
- package/lib/links.js +9 -9
- package/lib/llms.js +619 -54
- package/lib/minify.js +10 -10
- package/lib/redirects.js +9 -9
- package/lib/robots.js +87 -0
- package/lib/rss.js +22 -12
- package/lib/sass.js +10 -10
- package/lib/sitemap.js +22 -33
- package/lib/ssqch.js +5 -5
- package/lib/vue.js +14 -13
- package/package.json +21 -1
- package/types/from-hugo.d.ts +5 -0
- package/types/from-jekyll.d.ts +11 -0
- package/types/from-mkdocs.d.ts +11 -0
- package/types/from-vitepress.d.ts +5 -0
- package/types/index.d.ts +45 -29
- package/types/llms.d.ts +18 -8
- package/types/robots.d.ts +13 -0
- package/types/sass.d.ts +1 -1
- package/types/sitemap.d.ts +3 -5
- package/wasm/markdown.wasm +0 -0
- /package/lib/{chunk-JX43SJHU.js.LEGAL.txt → chunk-6FY77I4M.js.LEGAL.txt} +0 -0
- /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-
|
|
5
|
+
} from "./chunk-FQZDUDFK.js";
|
|
6
6
|
import {
|
|
7
7
|
build
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-6FY77I4M.js";
|
|
9
|
+
import "./chunk-YA23NDMW.js";
|
|
10
|
+
import "./chunk-V3G2QGL3.js";
|
|
11
11
|
import "./chunk-4Q6WMTER.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-UHRBPZ4A.js";
|
|
13
|
+
import "./chunk-25WERNDD.js";
|
|
13
14
|
import {
|
|
14
15
|
fileHash
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ER72RPD6.js";
|
|
16
17
|
import {
|
|
17
18
|
filesRead
|
|
18
19
|
} from "./chunk-3NYSSA2C.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-VILOEVK7.js";
|
|
21
|
+
import "./chunk-ULCT3PAV.js";
|
|
21
22
|
import {
|
|
22
23
|
summary
|
|
23
|
-
} from "./chunk-
|
|
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-
|
|
30
|
+
import "./chunk-6OUCRDYI.js";
|
|
31
|
+
import "./chunk-SPIFZBIW.js";
|
|
30
32
|
import "./chunk-FVZ5JBRI.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-UU43WIZG.js";
|
|
33
|
+
import "./chunk-FJML7INB.js";
|
|
33
34
|
import {
|
|
34
35
|
describeThrown,
|
|
35
36
|
loadedFiles
|
|
36
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
21
|
+
} from "./chunk-HDKU6LRI.js";
|
|
21
22
|
import "./chunk-P2WS4RM4.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
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-
|
|
28
|
+
import "./chunk-FJML7INB.js";
|
|
28
29
|
import "./chunk-CMUWRPSQ.js";
|
|
29
|
-
import "./chunk-
|
|
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-
|
|
5
|
+
} from "./chunk-FENJHLNM.js";
|
|
6
6
|
import {
|
|
7
7
|
loadConfig,
|
|
8
8
|
schemaTypes
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
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-
|
|
17
|
+
import "./chunk-6OUCRDYI.js";
|
|
18
|
+
import "./chunk-SPIFZBIW.js";
|
|
18
19
|
import "./chunk-FVZ5JBRI.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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 =
|
|
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-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
import "./chunk-
|
|
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-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
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-
|
|
27
|
+
import "./chunk-6OUCRDYI.js";
|
|
28
|
+
import "./chunk-SPIFZBIW.js";
|
|
27
29
|
import "./chunk-FVZ5JBRI.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-57HLSKZS.js";
|
|
30
|
+
import "./chunk-FJML7INB.js";
|
|
31
|
+
import "./chunk-4AZFCSGJ.js";
|
|
31
32
|
import "./chunk-CMUWRPSQ.js";
|
|
32
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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: "
|
|
111
|
-
about: "
|
|
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
|
|
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-
|
|
362
|
-
if (command === "scout") return (await import("./chunk-
|
|
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-
|
|
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-
|
|
374
|
+
return (await import("./chunk-T5IUI7W7.js")).runCapabilities(format, CAPABILITY_ORDER);
|
|
368
375
|
case "docs":
|
|
369
|
-
return (await import("./chunk-
|
|
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-
|
|
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-
|
|
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
|
|
395
|
-
if (
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 (
|
|
447
|
-
await
|
|
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-
|
|
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-
|
|
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
|
|
493
|
+
async function runTrace(config, target, name, format) {
|
|
485
494
|
checkFormat(format);
|
|
486
|
-
const { field, fieldText,
|
|
495
|
+
const { field, fieldText, trace, traceJson, traceText } = await import("./chunk-ENWDM2RW.js");
|
|
487
496
|
let report;
|
|
488
497
|
try {
|
|
489
|
-
report = await
|
|
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(
|
|
500
|
-
else process.stdout.write(one ? fieldText(one) :
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
+
} from "./chunk-SNQOHNXE.js";
|
|
6
6
|
import {
|
|
7
7
|
BUILTINS,
|
|
8
8
|
debugString,
|
|
9
9
|
rewriteHtml,
|
|
10
10
|
withBase
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-VILOEVK7.js";
|
|
12
|
+
import "./chunk-ULCT3PAV.js";
|
|
13
13
|
import {
|
|
14
14
|
count
|
|
15
|
-
} from "./chunk-
|
|
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-
|
|
19
|
+
import "./chunk-6OUCRDYI.js";
|
|
20
|
+
import "./chunk-SPIFZBIW.js";
|
|
20
21
|
import "./chunk-FVZ5JBRI.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
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-
|
|
28
|
+
} from "./chunk-YNJNMQWU.js";
|
|
29
29
|
import {
|
|
30
30
|
compareText,
|
|
31
31
|
displayPath,
|
package/lib/from-hugo.js
ADDED
|
@@ -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
|
+
};
|