ssqch 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundled/docs/agents.md +70 -0
- package/bundled/docs/benchmarks.md +29 -0
- package/bundled/docs/build-summary.md +27 -0
- package/bundled/docs/comparing-builds.md +51 -0
- package/bundled/docs/configuring.md +138 -0
- package/bundled/docs/content-schemas.md +54 -0
- package/bundled/docs/css-and-javascript.md +33 -0
- package/bundled/docs/data-files.md +55 -0
- package/bundled/docs/deploying.md +47 -0
- package/bundled/docs/field-guide.md +144 -0
- package/bundled/docs/footprint.md +27 -0
- package/bundled/docs/github-pages.md +41 -0
- package/bundled/docs/index.md +26 -0
- package/bundled/docs/install.md +27 -0
- package/bundled/docs/known-gaps.md +18 -0
- package/bundled/docs/markdown.md +114 -0
- package/bundled/docs/multilingual.md +14 -0
- package/bundled/docs/nav.yml +50 -0
- package/bundled/docs/netlify.md +30 -0
- package/bundled/docs/new-pages.md +42 -0
- package/bundled/docs/plugins.md +13 -0
- package/bundled/docs/rust-plugins.md +32 -0
- package/bundled/docs/seo.md +19 -0
- package/bundled/docs/template-languages.md +106 -0
- package/bundled/docs/templates.md +37 -0
- package/bundled/docs/themes.md +31 -0
- package/bundled/{trailheads → docs/trailheads}/from-component-frameworks.md +7 -3
- package/bundled/{trailheads → docs/trailheads}/from-docusaurus.md +7 -4
- package/bundled/{trailheads → docs/trailheads}/from-eleventy.md +7 -4
- package/bundled/{trailheads → docs/trailheads}/from-hexo.md +7 -4
- package/bundled/{trailheads → docs/trailheads}/from-jekyll.md +6 -3
- package/bundled/{trailheads → docs/trailheads}/from-mkdocs.md +8 -5
- package/bundled/{trailheads → docs/trailheads}/from-zola.md +6 -3
- package/bundled/docs/trailheads.md +38 -0
- package/bundled/docs/where-values-come-from.md +57 -0
- package/bundled/ssqch.d.ts +3 -1
- package/lib/assets.js +15 -7
- package/lib/{chunk-GUKSZ2XM.js → chunk-2LEOPLTZ.js} +2 -2
- package/lib/{chunk-3K3ANWZ2.js → chunk-3EPHKJEG.js} +3 -3
- package/lib/{chunk-SXMJ52IK.js → chunk-3HHRKG33.js} +56 -16
- package/lib/{chunk-NCWFYT74.js → chunk-5DNDSNTP.js} +3 -3
- package/lib/{chunk-TVU3OPPK.js → chunk-7HXCQEGA.js} +3 -3
- package/lib/{chunk-GRWMGC7D.js → chunk-BGCBSQ4A.js} +3054 -3053
- package/lib/{chunk-3A647I3N.js → chunk-CB6YFUXU.js} +3 -3
- package/lib/{chunk-7RDRZHJD.js → chunk-DMVJ53SM.js} +9 -9
- package/lib/{chunk-IJWHOFRP.js → chunk-DW7VMJEZ.js} +9 -9
- package/lib/{chunk-SURPOAW7.js → chunk-E5UB2YY7.js} +6 -6
- package/lib/{chunk-D2XE2GTY.js → chunk-EEJDLCD3.js} +7 -7
- package/lib/{chunk-7PWCYHTJ.js → chunk-HDQ4SRWM.js} +3 -3
- package/lib/{chunk-7SD7K567.js → chunk-HGJ5VWUR.js} +1 -1
- package/lib/{chunk-76NTVE34.js → chunk-JWCCVTTR.js} +1 -1
- package/lib/{chunk-TICWN55Z.js → chunk-JXZT5L7W.js} +2 -2
- package/lib/{chunk-MI6EJWA2.js → chunk-LAV3DEY4.js} +1 -1
- package/lib/{chunk-7XLK2GEG.js → chunk-LCPSKHAV.js} +1 -1
- package/lib/{chunk-II5DEH3Q.js → chunk-N4O5MDIB.js} +2 -2
- package/lib/{chunk-HPXAZ2HU.js → chunk-NFJJKDRI.js} +1 -1
- package/lib/{chunk-LPHNACE4.js → chunk-NUUEOGLZ.js} +8 -8
- package/lib/{chunk-NNUKIGOO.js → chunk-Q4LFTYK2.js} +11 -11
- package/lib/{chunk-R7K3D5W5.js → chunk-QMA7CK7B.js} +29 -6
- package/lib/{chunk-SF4I6Z7S.js → chunk-RJFWTW2Y.js} +2 -2
- package/lib/{chunk-BEGC7YP6.js → chunk-RKFZSVNF.js} +6 -6
- package/lib/{chunk-XMXBHXZR.js → chunk-RM5Q3KFB.js} +9 -9
- package/lib/{chunk-RNJFPFXE.js → chunk-RVBNVGZV.js} +3 -3
- package/lib/{chunk-CZ4XQC56.js → chunk-SA5KSJ4Y.js} +8 -4
- package/lib/{chunk-DELWRJAO.js → chunk-SRNLKWXL.js} +60 -35
- package/lib/{chunk-YTHQBMDJ.js → chunk-Y2ESFAAD.js} +2 -3
- package/lib/{chunk-47P4YREZ.js → chunk-ZM6TU2JB.js} +6 -6
- package/lib/cli.js +20 -20
- package/lib/elements.js +7 -7
- package/lib/image.js +8 -8
- package/lib/links.js +10 -10
- package/lib/minify.js +7 -7
- package/lib/redirects.js +8 -8
- package/lib/rss.js +20 -19
- package/lib/sass.js +7 -7
- package/lib/sitemap.js +7 -7
- package/lib/ssqch.js +4 -4
- package/package.json +2 -2
- package/types/index.d.ts +2 -0
- package/types/rss.d.ts +1 -1
- package/bundled/README.md +0 -1314
- package/lib/{chunk-GRWMGC7D.js.LEGAL.txt → chunk-BGCBSQ4A.js.LEGAL.txt} +3 -3
- /package/lib/{chunk-DELWRJAO.js.LEGAL.txt → chunk-SRNLKWXL.js.LEGAL.txt} +0 -0
package/lib/rss.js
CHANGED
|
@@ -2,28 +2,29 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
feedImages
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7HXCQEGA.js";
|
|
6
6
|
import {
|
|
7
7
|
Options
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HGJ5VWUR.js";
|
|
9
9
|
import {
|
|
10
10
|
BUILTINS,
|
|
11
|
-
rewriteHtml
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
rewriteHtml,
|
|
12
|
+
withBaseOnce
|
|
13
|
+
} from "./chunk-QMA7CK7B.js";
|
|
14
|
+
import "./chunk-LCPSKHAV.js";
|
|
14
15
|
import "./chunk-NKXEPHRZ.js";
|
|
15
16
|
import "./chunk-AD3HAW3W.js";
|
|
16
17
|
import "./chunk-DDV6JEC2.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5DNDSNTP.js";
|
|
18
19
|
import "./chunk-FVZ5JBRI.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-NFJJKDRI.js";
|
|
20
21
|
import "./chunk-UU43WIZG.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-JWCCVTTR.js";
|
|
22
23
|
import "./chunk-CMUWRPSQ.js";
|
|
23
24
|
import {
|
|
24
25
|
bail,
|
|
25
26
|
toDate
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
27
28
|
import "./chunk-VJWQSYEG.js";
|
|
28
29
|
import "./chunk-I3PS26CI.js";
|
|
29
30
|
|
|
@@ -69,15 +70,15 @@ function year(d) {
|
|
|
69
70
|
if (y < 0) return `-${String(-y).padStart(4, "0")}`;
|
|
70
71
|
return y > 9999 ? `+${y}` : String(y).padStart(4, "0");
|
|
71
72
|
}
|
|
72
|
-
function absoluteUrl(url, base) {
|
|
73
|
-
const text = String(url);
|
|
73
|
+
function absoluteUrl(url, base, siteBase = "") {
|
|
74
|
+
const text = withBaseOnce(siteBase, String(url));
|
|
74
75
|
try {
|
|
75
76
|
return new URL(text, String(base)).toString();
|
|
76
77
|
} catch {
|
|
77
78
|
return text;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
function htmlToAbsoluteUrls(html, base) {
|
|
81
|
+
function htmlToAbsoluteUrls(html, base, siteBase = "") {
|
|
81
82
|
const baseUrl = String(base);
|
|
82
83
|
return rewriteHtml(String(html ?? ""), {
|
|
83
84
|
tag(el) {
|
|
@@ -85,25 +86,25 @@ function htmlToAbsoluteUrls(html, base) {
|
|
|
85
86
|
const v = el.get(attr);
|
|
86
87
|
if (v === void 0) continue;
|
|
87
88
|
if (attr !== "srcset") {
|
|
88
|
-
el.set(attr, absoluteUrl(v, baseUrl));
|
|
89
|
+
el.set(attr, absoluteUrl(v, baseUrl, siteBase));
|
|
89
90
|
continue;
|
|
90
91
|
}
|
|
91
92
|
const candidates = v.split(",").map((c) => {
|
|
92
93
|
const candidate = c.trim();
|
|
93
94
|
const space = candidate.indexOf(" ");
|
|
94
|
-
return space === -1 ? absoluteUrl(candidate, baseUrl) : `${absoluteUrl(candidate.slice(0, space), baseUrl)} ${candidate.slice(space + 1)}`;
|
|
95
|
+
return space === -1 ? absoluteUrl(candidate, baseUrl, siteBase) : `${absoluteUrl(candidate.slice(0, space), baseUrl, siteBase)} ${candidate.slice(space + 1)}`;
|
|
95
96
|
});
|
|
96
97
|
el.set(attr, candidates.join(", "));
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
|
-
function feedHtml(html, base, options) {
|
|
102
|
+
function feedHtml(html, base, options, siteBase = "") {
|
|
102
103
|
const feedImages2 = feedImages;
|
|
103
104
|
if (typeof feedImages2 !== "function") bail("feedHtml() isn't in the Node build of ssqch yet (the move to Node, stage 5)");
|
|
104
105
|
const source = html === void 0 || html === null ? "" : String(html);
|
|
105
106
|
const done = feedImages2(source, String(base), options);
|
|
106
|
-
return typeof done === "string" ? htmlToAbsoluteUrls(done, base) : done.then((h) => htmlToAbsoluteUrls(h, base));
|
|
107
|
+
return typeof done === "string" ? htmlToAbsoluteUrls(done, base, siteBase) : done.then((h) => htmlToAbsoluteUrls(h, base, siteBase));
|
|
107
108
|
}
|
|
108
109
|
BUILTINS.set("ssqch/rss", (config, options) => {
|
|
109
110
|
new Options(options, []);
|
|
@@ -111,15 +112,15 @@ BUILTINS.set("ssqch/rss", (config, options) => {
|
|
|
111
112
|
filters.set("getNewestCollectionItemDate", (items) => getNewestCollectionItemDate(items));
|
|
112
113
|
filters.set("dateToRfc3339", (date) => dateToRfc3339(date));
|
|
113
114
|
filters.set("dateToRfc822", (date) => dateToRfc822(date));
|
|
114
|
-
filters.set("absoluteUrl", (url, base) => absoluteUrl(output(url), output(base)));
|
|
115
|
-
filters.set("htmlToAbsoluteUrls", (html, base) => htmlToAbsoluteUrls(output(html), output(base)));
|
|
115
|
+
filters.set("absoluteUrl", (url, base) => absoluteUrl(output(url), output(base), config.base));
|
|
116
|
+
filters.set("htmlToAbsoluteUrls", (html, base) => htmlToAbsoluteUrls(output(html), output(base), config.base));
|
|
116
117
|
const unprefixed = (e) => {
|
|
117
118
|
if (e instanceof Error && e.message.startsWith("feedHtml(): ")) e.message = e.message.slice("feedHtml(): ".length);
|
|
118
119
|
return e;
|
|
119
120
|
};
|
|
120
121
|
filters.set("feedHtml", (html, base, options2) => {
|
|
121
122
|
try {
|
|
122
|
-
const done = feedHtml(html, base, options2);
|
|
123
|
+
const done = feedHtml(html, base, options2, config.base);
|
|
123
124
|
return typeof done === "string" ? done : done.catch((e) => {
|
|
124
125
|
throw unprefixed(e);
|
|
125
126
|
});
|
package/lib/sass.js
CHANGED
|
@@ -5,30 +5,30 @@ import {
|
|
|
5
5
|
} from "./chunk-3NYSSA2C.js";
|
|
6
6
|
import {
|
|
7
7
|
Options
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HGJ5VWUR.js";
|
|
9
9
|
import {
|
|
10
10
|
BUILTINS,
|
|
11
11
|
cssWithBase,
|
|
12
12
|
debugString,
|
|
13
13
|
wasi
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-QMA7CK7B.js";
|
|
15
|
+
import "./chunk-LCPSKHAV.js";
|
|
16
16
|
import "./chunk-NKXEPHRZ.js";
|
|
17
17
|
import "./chunk-AD3HAW3W.js";
|
|
18
18
|
import "./chunk-DDV6JEC2.js";
|
|
19
19
|
import {
|
|
20
20
|
WebAssembly
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5DNDSNTP.js";
|
|
22
22
|
import "./chunk-FVZ5JBRI.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-NFJJKDRI.js";
|
|
24
24
|
import "./chunk-UU43WIZG.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-JWCCVTTR.js";
|
|
26
26
|
import "./chunk-CMUWRPSQ.js";
|
|
27
27
|
import {
|
|
28
28
|
BuildError,
|
|
29
29
|
bail,
|
|
30
30
|
messageOf
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
32
32
|
import {
|
|
33
33
|
comparePaths,
|
|
34
34
|
displayPath,
|
package/lib/sitemap.js
CHANGED
|
@@ -2,29 +2,29 @@ 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-HGJ5VWUR.js";
|
|
6
6
|
import {
|
|
7
7
|
BUILTINS,
|
|
8
8
|
debugString,
|
|
9
9
|
escapeHtml,
|
|
10
10
|
isoDay
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-QMA7CK7B.js";
|
|
12
|
+
import "./chunk-LCPSKHAV.js";
|
|
13
13
|
import "./chunk-NKXEPHRZ.js";
|
|
14
14
|
import "./chunk-AD3HAW3W.js";
|
|
15
15
|
import "./chunk-DDV6JEC2.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-5DNDSNTP.js";
|
|
17
17
|
import "./chunk-FVZ5JBRI.js";
|
|
18
18
|
import {
|
|
19
19
|
globSet
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NFJJKDRI.js";
|
|
21
21
|
import "./chunk-UU43WIZG.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-JWCCVTTR.js";
|
|
23
23
|
import "./chunk-CMUWRPSQ.js";
|
|
24
24
|
import {
|
|
25
25
|
bail,
|
|
26
26
|
toDate
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
28
28
|
import {
|
|
29
29
|
compareText
|
|
30
30
|
} from "./chunk-VJWQSYEG.js";
|
package/lib/ssqch.js
CHANGED
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
readData,
|
|
9
9
|
slugger,
|
|
10
10
|
slugify
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5DNDSNTP.js";
|
|
12
12
|
import "./chunk-FVZ5JBRI.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-NFJJKDRI.js";
|
|
14
14
|
import "./chunk-UU43WIZG.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-JWCCVTTR.js";
|
|
16
16
|
import "./chunk-CMUWRPSQ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-BGCBSQ4A.js";
|
|
18
18
|
import "./chunk-VJWQSYEG.js";
|
|
19
19
|
import "./chunk-I3PS26CI.js";
|
|
20
20
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ssqch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "SiteSquatch (ssqch): a fast static site generator, configured with JavaScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"static site generator",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"liquid",
|
|
13
13
|
"edge"
|
|
14
14
|
],
|
|
15
|
-
"homepage": "https://
|
|
15
|
+
"homepage": "https://sitesquatch.dev",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/reverentgeek/sitesquatch.git",
|
package/types/index.d.ts
CHANGED
|
@@ -226,6 +226,8 @@ export interface Config extends ConfigParts {
|
|
|
226
226
|
strict?: boolean;
|
|
227
227
|
/** `page.lastModified`: `"git"` for the last commit that changed the page's file (its modification time when it has uncommitted changes), or `"file"` for the modification time. Off by default. Needs the full history in CI (`fetch-depth: 0`). */
|
|
228
228
|
lastModified?: "git" | "file" | false;
|
|
229
|
+
/** The date of a page with no date of its own (in its data or its file name): `"git"` for the last commit that changed its file, the same in every checkout, or `"file"` (the default) for the file's modification time, which is when the checkout wrote it. Either way it sorts after the dated pages, by path. Needs the full history in CI (`fetch-depth: 0`). */
|
|
230
|
+
dateFallback?: "git" | "file";
|
|
229
231
|
/** The time zone the site's own JavaScript runs in, as an IANA name (`"UTC"`, `"America/New_York"`): `Date`'s local methods and libraries like luxon and date-fns, in data files, filters, hooks and Edge templates, so a laptop and CI build the same pages. ssqch's own date filters are UTC whatever this says. Default: the machine's. The config's own top-level code runs before it applies. */
|
|
230
232
|
timeZone?: string;
|
|
231
233
|
/** The path the site is served under, when that isn't the root of its domain: `"/repo/"` for `https://you.github.io/repo/`. Templates and `page.url` stay as they are; ssqch adds the base to URLs from the site's root in the HTML it writes. Use the `withBase()` filter outside HTML attributes. */
|
package/types/rss.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export function getNewestCollectionItemDate(collection: unknown[]): Date | undef
|
|
|
10
10
|
export function dateToRfc3339(date: Date | string): string;
|
|
11
11
|
/** A date as RFC 822 (`Sat, 01 Jun 2024 00:00:00 +0000`), for RSS feeds. */
|
|
12
12
|
export function dateToRfc822(date: Date | string): string;
|
|
13
|
-
/** A URL made absolute against the site's address: `absoluteUrl(post.url, "https://example.com")`. */
|
|
13
|
+
/** A URL made absolute against the site's address: `absoluteUrl(post.url, "https://example.com")`. As a template filter, it puts the site's `base` in front of a URL from the root that doesn't have it yet; called from code, it resolves as `new URL(url, base)` does. */
|
|
14
14
|
export function absoluteUrl(url: string, base: string): string;
|
|
15
15
|
/** Every link and image in some HTML made absolute, for a feed's content. */
|
|
16
16
|
export function htmlToAbsoluteUrls(html: string, base: string): string;
|