ssqch 0.11.0 → 0.13.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/bundled/completions/bash +67 -9
- package/bundled/completions/elvish +24 -4
- package/bundled/completions/fish +37 -25
- package/bundled/completions/powershell +26 -4
- package/bundled/completions/zsh +45 -10
- package/bundled/docs/agents.md +2 -2
- package/bundled/docs/build-summary.md +1 -1
- package/bundled/docs/comparing-builds.md +7 -4
- package/bundled/docs/configuring.md +7 -12
- package/bundled/docs/deploying.md +1 -1
- package/bundled/docs/field-guide.md +4 -4
- package/bundled/docs/github-pages.md +2 -1
- 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 +11 -13
- package/bundled/docs/nav.yml +6 -1
- package/bundled/docs/netlify.md +4 -2
- package/bundled/docs/patrol.md +48 -0
- package/bundled/docs/plugins.md +6 -4
- package/bundled/docs/robots.md +72 -0
- package/bundled/docs/seo.md +2 -38
- package/bundled/docs/serving-markdown.md +142 -0
- package/bundled/docs/template-languages.md +2 -1
- package/bundled/docs/templates.md +2 -1
- package/bundled/docs/trailheads/from-component-frameworks.md +9 -10
- 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 +142 -0
- package/bundled/docs/trailheads.md +5 -5
- package/bundled/docs/where-values-come-from.md +5 -5
- package/bundled/docs/writing-plugins.md +69 -0
- package/bundled/ssqch.d.ts +150 -34
- 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 +13 -11
- package/lib/chunk-25WERNDD.js +112 -0
- package/lib/{chunk-H5K2ZE7B.js → chunk-2BJFGKOE.js} +13 -5
- package/lib/chunk-2FKYWYAB.js +268 -0
- package/lib/{chunk-LJOURBYT.js → chunk-3ZTRIO6O.js} +21 -19
- package/lib/{chunk-IOBC665M.js → chunk-4AZFCSGJ.js} +5 -3
- package/lib/{chunk-HWW5NCVJ.js → chunk-4Q6WMTER.js} +1 -1
- package/lib/{chunk-V2FSMOFX.js → chunk-55WXDGO4.js} +3 -3
- package/lib/{chunk-ZR3JYLFB.js → chunk-6FY77I4M.js} +331 -58
- package/lib/{chunk-JC54PHIT.js → chunk-6OUCRDYI.js} +514 -141
- package/lib/{chunk-ERAIEV3O.js → chunk-6U5VIQVY.js} +9 -7
- package/lib/{chunk-Z5OP43HU.js → chunk-7U5GWTEH.js} +455 -94
- package/lib/{chunk-CMJ7X5WW.js → chunk-AIJNG6MJ.js} +3 -2
- package/lib/{chunk-3K237XAX.js → chunk-C2Q7JKFI.js} +12 -10
- package/lib/{chunk-GS5B3CBW.js → chunk-DDV6JEC2.js} +1 -1
- package/lib/{chunk-A75EVUJX.js → chunk-DFJFHULZ.js} +47 -20
- package/lib/{chunk-KZZS4W2V.js → chunk-ENWDM2RW.js} +45 -42
- package/lib/{chunk-I3HYKEEW.js → chunk-ER72RPD6.js} +3 -3
- package/lib/chunk-F3JPNFCZ.js +23 -0
- package/lib/{chunk-B5E27PLU.js → chunk-FENJHLNM.js} +6 -3
- package/lib/{chunk-UU43WIZG.js → chunk-FJML7INB.js} +4 -2
- package/lib/{chunk-KCF2Z6N7.js → chunk-FQZDUDFK.js} +5 -3
- package/lib/{chunk-GJNIQAIH.js → chunk-GSNRAGKQ.js} +13 -6
- package/lib/{chunk-443ZQLVX.js → chunk-GU7BBYWB.js} +5 -4
- package/lib/{chunk-X2GAVYV2.js → chunk-HDKU6LRI.js} +110 -748
- package/lib/chunk-J3C2LEW7.js +121 -0
- package/lib/{chunk-XS4EJSEK.js → chunk-K5WZ2VYK.js} +7 -5
- package/lib/{chunk-3HZZY3Y7.js → chunk-OOKBXQAY.js} +7 -6
- package/lib/chunk-P2WS4RM4.js +707 -0
- package/lib/{chunk-RBNPBTDP.js → chunk-SNQOHNXE.js} +1 -1
- package/lib/{chunk-HFSWUTXX.js → chunk-SPIFZBIW.js} +1 -1
- package/lib/{chunk-QLUTNR37.js → chunk-T5IUI7W7.js} +12 -11
- package/lib/{chunk-ZINLHOX4.js → chunk-TGSVSG2G.js} +3 -2
- package/lib/{chunk-2L3HR67O.js → chunk-U2KEMVXO.js} +24 -16
- package/lib/{chunk-RYIWYWRQ.js → chunk-UHRBPZ4A.js} +7 -5
- package/lib/{chunk-2QTJTEBV.js → chunk-ULCT3PAV.js} +1 -1
- package/lib/{chunk-FCM3NYFR.js → chunk-UZNUS7RP.js} +12 -9
- package/lib/{chunk-GLJQ4C76.js → chunk-V3G2QGL3.js} +13 -106
- package/lib/{chunk-Z44IAMNG.js → chunk-VILOEVK7.js} +60 -28
- package/lib/chunk-VJWQSYEG.js +119 -0
- package/lib/{chunk-5ELAUHRL.js → chunk-WGAIE3DD.js} +23 -19
- package/lib/{chunk-OQGXZYZS.js → chunk-WUCRAV36.js} +13 -7
- package/lib/{chunk-RZYAIX2R.js → chunk-XYAWJTHM.js} +11 -10
- package/lib/{chunk-OSBEH67S.js → chunk-YA23NDMW.js} +5 -3
- package/lib/{chunk-AIMEXBTK.js → chunk-YNJNMQWU.js} +37 -142
- package/lib/{chunk-QJ5ZFTML.js → chunk-ZMG25MXF.js} +20 -18
- package/lib/cli.js +72 -35
- package/lib/elements.js +13 -11
- 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 +12 -11
- package/lib/links.js +13 -11
- package/lib/llms.js +613 -0
- package/lib/minify.js +14 -12
- package/lib/redirects.js +13 -11
- package/lib/robots.js +87 -0
- package/lib/rss.js +24 -13
- package/lib/sass.js +12 -11
- package/lib/sitemap.js +23 -18
- package/lib/ssqch.js +6 -5
- package/lib/vue.js +400 -0
- package/package.json +29 -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 +51 -31
- package/types/llms.d.ts +27 -0
- package/types/robots.d.ts +13 -0
- package/types/sass.d.ts +1 -1
- package/types/sitemap.d.ts +2 -2
- package/types/vue.d.ts +17 -0
- package/wasm/markdown.wasm +0 -0
- package/lib/chunk-RVXGUMFI.js +0 -21
- /package/lib/{chunk-ZR3JYLFB.js.LEGAL.txt → chunk-6FY77I4M.js.LEGAL.txt} +0 -0
- /package/lib/{chunk-AIMEXBTK.js.LEGAL.txt → chunk-YNJNMQWU.js.LEGAL.txt} +0 -0
package/types/index.d.ts
CHANGED
|
@@ -52,23 +52,23 @@ export type Highlighter = ((code: string, lang: string) => Token[]) | string;
|
|
|
52
52
|
|
|
53
53
|
/** How Markdown renders. */
|
|
54
54
|
export interface MarkdownOptions {
|
|
55
|
-
/** Automatic heading `id`s: `"github"` (the default: GitHub's and github-slugger's anchors, character for character), `"blackfriday"` (Hugo's older style: `a-b` for `A -- B`), `"kramdown"` (Jekyll's: GitHub's ids for the page's headings, and kramdown's ASCII ones, `section` for none, for headings inside `markdown="1"` HTML), `"markdown-it-anchor"` (that plugin's default: the lowercase text with spaces as `-`, percent-encoded, `what%E2%80%99s-new%3F`), `"python-markdown"` (MkDocs': Python-Markdown's `toc` ids, ASCII, `cafe-notes` for `Café notes`), or `false` for none. A `{#id}` on the heading always wins. */
|
|
56
|
-
headingIds?: "github" | "blackfriday" | "ascii" | "kramdown" | "markdown-it-anchor" | "python-markdown" | false | ((text: string) => string);
|
|
55
|
+
/** Automatic heading `id`s: `"github"` (the default: GitHub's and github-slugger's anchors, character for character), `"blackfriday"` (Hugo's older style: `a-b` for `A -- B`), `"kramdown"` (Jekyll's: GitHub's ids for the page's headings, and kramdown's ASCII ones, `section` for none, for headings inside `markdown="1"` HTML), `"markdown-it-anchor"` (that plugin's default: the lowercase text with spaces as `-`, percent-encoded, `what%E2%80%99s-new%3F`), `"python-markdown"` (MkDocs': Python-Markdown's `toc` ids, ASCII, `cafe-notes` for `Café notes`), or `false` for none. A `{#id}` on the heading always wins. `"vitepress"`: VitePress's (@mdit-vue's `slugify`: `What's Vue?` is `what-s-vue`, `1. Setup` is `_1-setup`). */
|
|
56
|
+
headingIds?: "github" | "blackfriday" | "ascii" | "kramdown" | "markdown-it-anchor" | "python-markdown" | "vitepress" | false | ((text: string) => string);
|
|
57
57
|
/** `## Heading {#id .class key=value}`. Default `true`. */
|
|
58
58
|
headingAttributes?: boolean;
|
|
59
59
|
/** `[^1]` references, with the notes at the end of the page. Default `true`. */
|
|
60
60
|
footnotes?: boolean;
|
|
61
61
|
/** `- [ ]` and `- [x]` items. Default `true`. */
|
|
62
62
|
taskLists?: boolean;
|
|
63
|
-
/** Bare `https://` and `www.` URLs become links. `"fuzzy"` links bare domains (`example.com`, with a common or two-letter country TLD) and email addresses too, as markdown-it's `linkify` does. Default `true`. */
|
|
64
|
-
autolinks?: boolean | "fuzzy";
|
|
65
|
-
/** A single newline inside a paragraph (or a list item) becomes a `<br
|
|
63
|
+
/** Bare `https://` and `www.` URLs become links. `"fuzzy"` links bare domains (`example.com`, with a common or two-letter country TLD) and email addresses too, as markdown-it's `linkify` does. `"email"` links email addresses (with `mailto:`) and URLs, not bare domains, as markdown-it's `linkify` with `fuzzyLink: false` does (VitePress's setting). Default `true`. */
|
|
64
|
+
autolinks?: boolean | "fuzzy" | "email";
|
|
65
|
+
/** A single newline inside a paragraph (or a list item) becomes a `<br>`. Default `false`. (markdown-it's `breaks: true` writes the same.) */
|
|
66
66
|
breaks?: boolean;
|
|
67
|
-
/** An image (or a linked image) alone in a paragraph becomes `<figure><img alt=""><figcaption>its alt text</figcaption></figure
|
|
67
|
+
/** An image (or a linked image) alone in a paragraph becomes `<figure><img alt=""><figcaption>its alt text</figcaption></figure>`. Default `false`. (markdown-it-implicit-figures with `figcaption: true` writes the same.) */
|
|
68
68
|
figures?: boolean;
|
|
69
69
|
/** GitHub's `> [!NOTE]` alerts: note, tip, important, warning and caution. Default `true`. */
|
|
70
70
|
alerts?: boolean;
|
|
71
|
-
/** `::: name args` blocks, rendered by `_includes/containers/name.*`. Default `true`. */
|
|
71
|
+
/** `::: name args` blocks, rendered by `_includes/containers/name.*`. A closing `:::` indented less than four spaces closes the innermost open container, so Prettier's `:::`, indented under the list it ends, works (as markdown-it-container and VitePress read them). Default `true`. */
|
|
72
72
|
containers?: boolean;
|
|
73
73
|
/** A term, then `: definition` lines. Default `false`. */
|
|
74
74
|
definitionLists?: boolean;
|
|
@@ -76,21 +76,9 @@ export interface MarkdownOptions {
|
|
|
76
76
|
smartPunctuation?: boolean;
|
|
77
77
|
/** Lines indented four spaces are code blocks. `false` renders them as ordinary Markdown (HTML indented inside Markdown, say); fences are still code. Default `true`. */
|
|
78
78
|
indentedCode?: boolean;
|
|
79
|
-
/** Link and image URLs are percent-encoded, as CommonMark's reference renderer writes them (`#كتابة` as `#%D9%83...`, `café.png` as `caf%C3%A9.png`). `false` writes them as the page has them, HTML-escaped only (`&` as `&`), as kramdown (Jekyll) does; browsers go to the same place either way. A link or image hook gets the URL as written in both. Default `true`. */
|
|
80
|
-
encodeUrls?: boolean;
|
|
81
79
|
/** Highlight fenced code at build time, with `hl-*` classes. The build writes their stylesheet to `/highlight.css`, or to `css` (a URL path), or not at all with `css: false`. `languages` adds languages or replaces built-in ones. `classes` names the tokens as another highlighter does, so a site keeps its theme's CSS: `"prism"` (`token keyword`, `<pre class="language-js">`, marked lines as `<mark class="highlight-line highlight-line-active">`), `"pygments"` or `"chroma"` (Pygments' short names, `k`, `s`, `nf`, which MkDocs' and Hugo's themes style), or `{ keyword: "tok-keyword" }` for some kinds; the stylesheet uses the same names. Default `false`. */
|
|
82
|
-
/** Markdown inside HTML, as Jekyll's kramdown reads it: `"kramdown"` renders the content of an element with `markdown="1"` (span-level for `p`, headings and inline elements, block-level for the others; `"block"` and `"span"` choose) and drops the attribute, and keeps kramdown's HTML rules: a block-level element is raw HTML to its end tag, blank lines and all. Default `false`: HTML is CommonMark's, and Markdown inside it stays text. */
|
|
83
|
-
htmlMarkdown?: "kramdown" | false;
|
|
84
|
-
/** MkDocs' admonitions: `"mkdocs"` writes `!!! note "Title"` (body indented four spaces) as Python-Markdown's `<div class="admonition note"><p class="admonition-title">Title</p>...</div>`, and `??? note` and `???+ note` (pymdownx.details) as `<details class="note">`, open with `+`. The title is the type's name when there's none, and left out for `""`. Default `false`. */
|
|
85
|
-
admonitions?: "mkdocs" | false;
|
|
86
|
-
/** MkDocs' content tabs: `"mkdocs"` writes `=== "Tab"` blocks (body indented four spaces; tabs one after another are one set, `===+` selected, `===!` a new set) as pymdownx.tabbed's `alternate_style` writes them (`<div class="tabbed-set tabbed-alternate">`), which Material's CSS styles. Default `false`. */
|
|
87
|
-
tabs?: "mkdocs" | false;
|
|
88
|
-
/** Hugo's shortcodes: `"hugo"` reads a shortcode on a line of its own as a container: `{{< note type="tip" >}}` to `{{< /note >}}` (or `{{% %}}`) renders `_includes/containers/note.*` with `container.args`, `container.props` and the content as Markdown; one with no closing tag has no content. A shortcode inside a line of text is left as written. Default `false`. */
|
|
89
|
-
shortcodes?: "hugo" | false;
|
|
90
80
|
/** Links to `.md` files (`[Setup](setup/install.md#first)`) go to the page built from that file, with the `#` part: `true` writes its URL from the site's root (`/setup/install/#first`), `"relative"` from the page, as MkDocs does (`setup/install/#first`). A link to a file that isn't a page stays as written, for the link checker. Default `false`. */
|
|
91
81
|
sourceLinks?: boolean | "relative";
|
|
92
|
-
/** Another Markdown's ways, where they're CommonMark's otherwise. `"python-markdown"` (MkDocs'): a raw HTML block runs to its closing tag, blank lines and all; a list nests at four spaces (an item indented less is the next item); and the HTML is Python-Markdown's: `"` as it is in text, `<hr />`, `<br />`, `<img alt="" src="" />`, a tight item's nested list right after its text, nothing at the end. Default `false`. */
|
|
93
|
-
dialect?: "python-markdown" | false;
|
|
94
82
|
highlight?: boolean | { css?: string | false; languages?: Record<string, Highlighter>; classes?: "prism" | "pygments" | "chroma" | Partial<Record<TokenKind, string>> };
|
|
95
83
|
}
|
|
96
84
|
|
|
@@ -126,6 +114,8 @@ export interface BuildEvent {
|
|
|
126
114
|
dirs: { input: string; output: string; includes: string; data: string };
|
|
127
115
|
/** The files the build wrote (`afterBuild` only). */
|
|
128
116
|
written?: string[];
|
|
117
|
+
/** While serving, the files whose change started this build, relative to the project root (`./src/guide/intro.md`), so a hook can skip work the change doesn't touch: `if (changed && !changed.some((f) => f.endsWith(".vue"))) return;`. Not there on the first build or a build of everything (`ssqch build`). */
|
|
118
|
+
changed?: string[];
|
|
129
119
|
}
|
|
130
120
|
|
|
131
121
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -206,11 +196,47 @@ export interface ConfigParts {
|
|
|
206
196
|
plugins?: Plugin[];
|
|
207
197
|
}
|
|
208
198
|
|
|
199
|
+
/** What a plugin's Markdown steps and hooks get besides their text. */
|
|
200
|
+
export interface MarkdownStepContext {
|
|
201
|
+
/** The page's data, as its templates see it. */
|
|
202
|
+
data: Record<string, any>;
|
|
203
|
+
/** The page (`data.page`): `url`, `inputPath` and the rest. */
|
|
204
|
+
page: Record<string, any> | undefined;
|
|
205
|
+
/** The site's `urls`: `"html"` when pages are `/guide/intro.html`. */
|
|
206
|
+
urls: "folders" | "html";
|
|
207
|
+
/** Markdown rendered with the site's options and hooks; `{ inline: true }` leaves out the `<p>`. */
|
|
208
|
+
markdown(text: string, options?: { inline?: boolean }): string;
|
|
209
|
+
/** Whether the site or a plugin has the render hook or container `name` (`"heading"`, `"containers/tip"`). */
|
|
210
|
+
hasHook(name: string): boolean;
|
|
211
|
+
/** Calls the render hook `name` with `value` under `key` (`renderHook("containers/tip", "container", { args, content })`): the site's template if it has one, else a plugin's. */
|
|
212
|
+
renderHook(name: string, key: string, value: Record<string, any>): string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** A plugin's own steps in ssqch's Markdown. Each answers at once with text. */
|
|
216
|
+
export interface PluginMarkdown {
|
|
217
|
+
/** The page's Markdown, before ssqch's Markdown reads it (after its template engine). Runs in the order the plugins are listed, before the site's `markdown.preprocess`. */
|
|
218
|
+
before?: (source: string, context: MarkdownStepContext) => string;
|
|
219
|
+
/** The HTML ssqch's Markdown wrote for the page, before its layouts. */
|
|
220
|
+
after?: (html: string, context: MarkdownStepContext) => string;
|
|
221
|
+
/** Render hooks and containers, as functions that return HTML: `heading`, `link`, `image`, `fence`, `code`, `table`, `containers/<name>`. Each gets what the template of the same name would (`heading.level`, `container.content`). A site's own template of the same name (`_includes/hooks/heading.*`) replaces it; a later plugin's replaces an earlier one's. */
|
|
222
|
+
hooks?: Record<string, (value: Record<string, any>, context: MarkdownStepContext) => string>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** A plugin: the config's parts, and what only a plugin can give. */
|
|
226
|
+
export interface PluginParts extends ConfigParts {
|
|
227
|
+
/** The plugin's name, for its errors. */
|
|
228
|
+
name?: string;
|
|
229
|
+
/** Steps in ssqch's Markdown, and render hooks as functions. */
|
|
230
|
+
markdown?: PluginMarkdown;
|
|
231
|
+
/** Values for the site's settings that its own config replaces: `markdown` options (`{ markdown: { headingIds: "ascii" } }`) for any key the site's `markdown` doesn't set. */
|
|
232
|
+
defaults?: { markdown?: MarkdownOptions };
|
|
233
|
+
}
|
|
234
|
+
|
|
209
235
|
export type Plugin =
|
|
210
|
-
|
|
|
236
|
+
| PluginParts
|
|
211
237
|
| BuiltinPlugin
|
|
212
238
|
| RustPlugin
|
|
213
|
-
| ((context: ConfigContext) => MaybePromise<
|
|
239
|
+
| ((context: ConfigContext) => MaybePromise<PluginParts | BuiltinPlugin | RustPlugin | false | null | undefined>)
|
|
214
240
|
| false
|
|
215
241
|
| null
|
|
216
242
|
| undefined;
|
|
@@ -239,21 +265,13 @@ export interface Config extends ConfigParts {
|
|
|
239
265
|
deepMerge?: boolean;
|
|
240
266
|
/** Delete output files an earlier build wrote or copied that this one didn't (a deleted post's page). Files other tools write are never touched. Default `false`. */
|
|
241
267
|
leaveNoTrace?: boolean;
|
|
242
|
-
/** Another name for `leaveNoTrace`. Set one of them. */
|
|
243
|
-
clean?: boolean;
|
|
244
268
|
/** Globs (relative to the input folder) of files that aren't pages, like `["drafts/**", "notes/*.wip.md"]`. */
|
|
245
269
|
ignore?: string | string[];
|
|
246
270
|
/** Page bundles: copy the other files in a folder whose page is `index.*` (images, downloads) next to the page. Default `false`. */
|
|
247
271
|
bundles?: boolean;
|
|
248
272
|
/** Printing an undefined value (`{{ titel }}`) is an error, in every template language. Conditionals and defaults still work. Default `false`. */
|
|
249
273
|
strict?: boolean;
|
|
250
|
-
/**
|
|
251
|
-
trimAfterFrontMatter?: boolean;
|
|
252
|
-
/** Templates see Jekyll's `page` and `site`, so a Jekyll site's layouts and includes run as written: `page` has the page's front matter too (`page.title`; ssqch's own keys, like `url` and `date`, win) and `page.path` and `page.categories`; `site` has the site's own keys, `posts` (newest first), each collection by its tag (`site.articles`), `pages`, `html_pages`, `categories`, `tags`, `data` (the global data) and `time`; and their items read in Jekyll's shape (`post.title`, `post.content`, `post.excerpt`). Off by default: front matter is at the top level (`title`) and items keep it under `data`. */
|
|
253
|
-
jekyllTemplates?: boolean;
|
|
254
|
-
/** Templates see what MkDocs gives a theme's, so an MkDocs theme's Jinja templates (Material for MkDocs') run as written: `config` (mkdocs.yml, with the theme's `mkdocs_theme.yml` under its `theme`), `nav` (Sections, Pages and Links, with `active` on the page being rendered), `page` in a layout (MkDocs' page: `title`, `url` without its first `/`, `abs_url`, `canonical_url`, `edit_url`, `content`, `toc`, `meta`, `previous_page`, `next_page`, `ancestors`, `is_homepage`), `base_url`, `mkdocs_version` and `build_date_utc`, and the `url` and `script_tag` filters, relative to the page. A Markdown page's layout is `main.html` (or its front matter's `template`), the theme's `404.html` makes `/404.html`, and Jinja doesn't escape (`jinja: { autoescape }` says otherwise). `true` reads `mkdocs.yml`; a string names another file. Off by default. */
|
|
255
|
-
mkdocsTemplates?: boolean | string;
|
|
256
|
-
/** Jinja's settings for `.jinja` and `.j2` templates. `autoescape: false` prints values as they are, as MkDocs' Jinja does (`| e` still escapes); default `true`, or `false` with `mkdocsTemplates`. `.njk` always escapes. */
|
|
274
|
+
/** Jinja's settings for `.jinja` and `.j2` templates. `autoescape: false` prints values as they are (`| e` still escapes); default `true`, or `false` with `fromMkdocs({ templates: true })`, since MkDocs' Jinja doesn't escape. `.njk` always escapes. */
|
|
257
275
|
jinja?: { autoescape?: boolean };
|
|
258
276
|
/** `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`). */
|
|
259
277
|
lastModified?: "git" | "file" | false;
|
|
@@ -261,7 +279,9 @@ export interface Config extends ConfigParts {
|
|
|
261
279
|
dateFallback?: "git" | "file";
|
|
262
280
|
/** 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. */
|
|
263
281
|
timeZone?: string;
|
|
264
|
-
/**
|
|
282
|
+
/** A page's URL when it has no `permalink`: `"folders"` (the default) writes `guide/intro.md` as `/guide/intro/` (`guide/intro/index.html`), `"html"` as `/guide/intro.html`. An index page is its folder either way (`guide/index.md` is `/guide/`). (`"html"` is VitePress without `cleanUrls`, Hugo's `uglyURLs` and Docusaurus's `trailingSlash: false`.) */
|
|
283
|
+
urls?: "folders" | "html";
|
|
284
|
+
/** Other names for layouts: `{ post: "layouts/post.njk" }` makes `layout: post` that file (where it would be `_includes/post.*`). A page's `layout` is still the name it gave. (Eleventy's `addLayoutAlias` does the same.) */
|
|
265
285
|
layoutAliases?: Record<string, string>;
|
|
266
286
|
/** 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. */
|
|
267
287
|
base?: string;
|
package/types/llms.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// ssqch/llms: from ssqch.d.ts, the types `ssqch types` writes.
|
|
2
|
+
/// <reference path="./globals.d.ts" />
|
|
3
|
+
import type { BuiltinPlugin } from "ssqch";
|
|
4
|
+
/** A page as `section` and `sort` get it. */
|
|
5
|
+
export interface LlmsPage { url: string; inputPath: string; outputPath: string; date: Date; data: Record<string, any> }
|
|
6
|
+
export interface LlmsPluginOptions {
|
|
7
|
+
/** The `# heading` of `llms.txt`. Default: `site.title` in the site's data, or the home page's title. */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** A line under it, as `> description`. */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Markdown after the description, in `llms.txt` and `llms-full.txt`: what a model should know before it reads on, like a list of where else the docs are. */
|
|
12
|
+
details?: string;
|
|
13
|
+
/** The site's address, like `"https://example.com"`, for whole links in `llms.txt` and in every copy. Default: links from the site's root. */
|
|
14
|
+
url?: string;
|
|
15
|
+
/** URL globs of pages to leave out, like `["/blog/**"]`. 404 pages are always left out, and so is a page whose front matter says `llms: false`. */
|
|
16
|
+
exclude?: string[];
|
|
17
|
+
/** A Markdown copy of each listed page beside its URL (`/guide/intro.html` is `/guide/intro.md`, and `/guide/intro/` is `/guide/intro/index.md`, as llms.txt's v2 proposal has them), which `llms.txt` links to. A Markdown page's copy is its Markdown after its template engine ran; another page's is its `<article>`, `<main>` or `<body>` as Markdown. Links in a copy are whole addresses, and a link to a page with a copy goes to the copy. Default `true`; with `false`, `llms.txt` links to the pages. */
|
|
18
|
+
copies?: boolean;
|
|
19
|
+
/** `/llms-full.txt`, every listed page's Markdown in one file, each after a `url:` line. Default `true`. */
|
|
20
|
+
full?: boolean;
|
|
21
|
+
/** A page's section in `llms.txt`: a function that gets each page and returns a name. Default: its first folder (`/guide/...` is "Guide"; the top's pages are "Pages"). Sections are in the order their first page comes. */
|
|
22
|
+
section?: (page: LlmsPage) => string | undefined;
|
|
23
|
+
/** The pages' order, as `Array.prototype.sort` takes it: `(a, b) => a.data.order - b.data.order`. Default: by URL. */
|
|
24
|
+
sort?: (a: LlmsPage, b: LlmsPage) => number;
|
|
25
|
+
}
|
|
26
|
+
/** Writes `/llms.txt` (the site's pages, with links to their Markdown), a Markdown copy of each, and `/llms-full.txt`, for language models, as llmstxt.org describes; and adds the template function `markdownCopy(page.url)`, the URL of a page's copy (or `""` when it has none), for a layout's `<link rel="alternate" type="text/markdown">`. */
|
|
27
|
+
export function llmsPlugin(options?: LlmsPluginOptions): BuiltinPlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// ssqch/robots: from ssqch.d.ts, the types `ssqch types` writes.
|
|
2
|
+
/// <reference path="./globals.d.ts" />
|
|
3
|
+
import type { BuiltinPlugin } from "ssqch";
|
|
4
|
+
export interface RobotsPluginOptions {
|
|
5
|
+
/** What AI crawlers may do, by what they're for: `training` (collecting pages to train models: GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, meta-externalagent, Bytespider), `search` (indexing them for an AI search: OAI-SearchBot, Claude-SearchBot, PerplexityBot) and `fetch` (reading a page a person asked about: ChatGPT-User, Claude-User, Perplexity-User, meta-externalfetcher). `false` gives that purpose's crawlers a group with `Disallow: /`. Each defaults to `true`: no group, so they read everyone's. */
|
|
6
|
+
ai?: { training?: boolean; search?: boolean; fetch?: boolean };
|
|
7
|
+
/** URL paths no crawler should read, like `["/drafts/"]`, as `Disallow:` lines in everyone's group. */
|
|
8
|
+
disallow?: string[];
|
|
9
|
+
/** The `Sitemap:` line: by default `sitemapPlugin()`'s address when it's on (none without it); `false` leaves it out; a string is another sitemap's whole address. */
|
|
10
|
+
sitemap?: boolean | string;
|
|
11
|
+
}
|
|
12
|
+
/** Writes `/robots.txt`: the paths no crawler reads, a group for each kind of AI crawler that's turned off, and the sitemap's address. */
|
|
13
|
+
export function robotsPlugin(options?: RobotsPluginOptions): BuiltinPlugin;
|
package/types/sass.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface SassPluginOptions {
|
|
|
9
9
|
style?: "compressed" | "expanded";
|
|
10
10
|
/** More folders `@use` and `@import` look in, relative to the project root. */
|
|
11
11
|
loadPaths?: string[];
|
|
12
|
-
/** `false` leaves out what CSS with a character outside ASCII starts with: a byte order mark (compressed) or `@charset "UTF-8";` (expanded)
|
|
12
|
+
/** `false` leaves out what CSS with a character outside ASCII starts with: a byte order mark (compressed) or `@charset "UTF-8";` (expanded). Default `true`. (Dart Sass's `--no-charset`; jekyll-sass-converter's CSS has neither.) */
|
|
13
13
|
charset?: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
package/types/sitemap.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import type { BuiltinPlugin } from "ssqch";
|
|
4
4
|
|
|
5
5
|
export interface SitemapPluginOptions {
|
|
6
|
-
/** The site's address, like `"https://example.com"
|
|
7
|
-
url
|
|
6
|
+
/** The site's address, like `"https://example.com"`: required, since a sitemap lists whole addresses and search engines read only those. With a `base`, it can be the domain or include the base. */
|
|
7
|
+
url: string;
|
|
8
8
|
/** URL globs to leave out, like `["/tags/**"]`. Pages with `sitemap: false` and 404 pages are always left out. */
|
|
9
9
|
exclude?: string[];
|
|
10
10
|
/** Add `<lastmod>` from each page's date. Default `true`. */
|
package/types/vue.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// ssqch/vue: from ssqch.d.ts, the types `ssqch types` writes.
|
|
2
|
+
/// <reference path="./globals.d.ts" />
|
|
3
|
+
import type { BuiltinPlugin } from "ssqch";
|
|
4
|
+
export interface VuePluginOptions {
|
|
5
|
+
/** Components every page can use without importing them, by name: `{ VueSchoolLink: ".vitepress/theme/components/VueSchoolLink.vue" }` (VitePress's `app.component()`), paths from the project's root. A page's own come from its `<script setup>` imports. */
|
|
6
|
+
components?: Record<string, string>;
|
|
7
|
+
/** Vite's root for the build, from the project's root. Default: the input folder (VitePress's `srcDir`), so the components' scope ids are the ones VitePress gave them. */
|
|
8
|
+
root?: string;
|
|
9
|
+
/** Run each component in the browser too, as an island: `"load"` (at once), `"idle"` (when the browser is idle) or `"visible"` (when it scrolls into view). Its server HTML is wrapped in `<ssqch-vue>` and the page gets one script, `/assets/vue/islands.js`. Default `false`: HTML only. */
|
|
10
|
+
hydrate?: false | "load" | "idle" | "visible";
|
|
11
|
+
/** Where the components' styles go: a path like `"/assets/vue.css"` (the default), for the layout to link, or `false`. */
|
|
12
|
+
css?: string | false;
|
|
13
|
+
/** Vite's options to add (`resolve.alias`, more `plugins`), as a Vite config has them. */
|
|
14
|
+
vite?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
/** Renders the Vue components a page uses (`<ApiIndex />`, imported in its `<script setup>`) with the site's own Vite, @vitejs/plugin-vue and Vue, at build time; with `hydrate`, as islands in the browser too. */
|
|
17
|
+
export function vuePlugin(options?: VuePluginOptions): BuiltinPlugin;
|
package/wasm/markdown.wasm
CHANGED
|
Binary file
|
package/lib/chunk-RVXGUMFI.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
2
|
-
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
baselineTime,
|
|
5
|
-
runBaseline
|
|
6
|
-
} from "./chunk-H5K2ZE7B.js";
|
|
7
|
-
import "./chunk-HWW5NCVJ.js";
|
|
8
|
-
import "./chunk-X2GAVYV2.js";
|
|
9
|
-
import "./chunk-RYIWYWRQ.js";
|
|
10
|
-
import "./chunk-2QTJTEBV.js";
|
|
11
|
-
import "./chunk-ERAIEV3O.js";
|
|
12
|
-
import "./chunk-GS5B3CBW.js";
|
|
13
|
-
import "./chunk-FVZ5JBRI.js";
|
|
14
|
-
import "./chunk-UU43WIZG.js";
|
|
15
|
-
import "./chunk-CMUWRPSQ.js";
|
|
16
|
-
import "./chunk-AIMEXBTK.js";
|
|
17
|
-
import "./chunk-I3PS26CI.js";
|
|
18
|
-
export {
|
|
19
|
-
baselineTime,
|
|
20
|
-
runBaseline
|
|
21
|
-
};
|
|
File without changes
|
|
File without changes
|