@dogsbay/ssg 0.2.0-beta.146 → 0.2.0-beta.149
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/dist/package/THIRD-PARTY-NOTICES.txt +5 -5
- package/dist/package/browser.mjs +289 -52
- package/dist/package/chunks/{prebuilt-css-default-GJIN3VOR.mjs → prebuilt-css-default-XHQGPWFR.mjs} +8 -1
- package/dist/package/chunks/{prebuilt-css-mintlify-SKWKD2KB.mjs → prebuilt-css-mintlify-ZOM7VGVT.mjs} +8 -1
- package/dist/package/client.mjs +10 -1
- package/dist/package/css.mjs +1 -0
- package/dist/package/types/core/build.d.ts +23 -6
- package/dist/package/types/core/config.d.ts +35 -1
- package/dist/package/types/core/links.d.ts +7 -0
- package/dist/package/types/theme/compose.d.ts +4 -0
- package/dist/package/types/theme/regions.d.ts +4 -0
- package/package.json +29 -29
|
@@ -22,6 +22,8 @@ export interface VersionDef {
|
|
|
22
22
|
path?: string;
|
|
23
23
|
/** The version's own banner text (`content.products:` only), instead of the standard one. */
|
|
24
24
|
banner?: string;
|
|
25
|
+
/** Show "Version: <label>" above the title of the version's pages (Docusaurus's version badge). */
|
|
26
|
+
badge?: boolean;
|
|
25
27
|
}
|
|
26
28
|
/** A call into @dogsbay/site-files' product model, its config errors reported as ours (dev and the CLI tell them apart). */
|
|
27
29
|
export declare function shared<T>(f: () => T): T;
|
|
@@ -29,12 +31,27 @@ export declare function shared<T>(f: () => T): T;
|
|
|
29
31
|
export interface ProductVersions {
|
|
30
32
|
versions: VersionDef[];
|
|
31
33
|
defaultVersion?: string;
|
|
34
|
+
/** The version menu's extras: the product's own `versionMenu:`, else the site's. */
|
|
35
|
+
menu?: VersionMenu;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* `versionMenu:` (content, or a product in `content.products:`): links listed after the versions
|
|
39
|
+
* ("All versions" → /archive, Docusaurus's dropdownItemsAfter), and how many versions to list.
|
|
40
|
+
*/
|
|
41
|
+
export interface VersionMenu {
|
|
42
|
+
/** `href` is a site path (`/archive`, `/archive/`) or an http(s) address. */
|
|
43
|
+
links: {
|
|
44
|
+
label: string;
|
|
45
|
+
href: string;
|
|
46
|
+
}[];
|
|
47
|
+
/** List the first `limit` versions (in config order), plus the page's own when it is further down. */
|
|
48
|
+
limit?: number;
|
|
32
49
|
}
|
|
33
50
|
/**
|
|
34
51
|
* A product's versions and default: its own with `content.products:`, else the site-wide `versions:`
|
|
35
52
|
* and `defaultVersion` (the unnamed source's, and every product's without the block).
|
|
36
53
|
*/
|
|
37
|
-
export declare function versionsOf(cfg: Pick<SiteConfig, "versions" | "defaultVersion" | "productVersions">, product: string | undefined): ProductVersions;
|
|
54
|
+
export declare function versionsOf(cfg: Pick<SiteConfig, "versions" | "defaultVersion" | "productVersions" | "versionMenu">, product: string | undefined): ProductVersions;
|
|
38
55
|
export interface LocaleDef {
|
|
39
56
|
id: string;
|
|
40
57
|
label: string;
|
|
@@ -90,6 +107,8 @@ export interface SiteConfig {
|
|
|
90
107
|
routablesFrom: "all" | "nav";
|
|
91
108
|
versions: VersionDef[];
|
|
92
109
|
defaultVersion?: string;
|
|
110
|
+
/** `content.versionMenu:` (VersionMenu), for every product without its own. */
|
|
111
|
+
versionMenu?: VersionMenu;
|
|
93
112
|
/** `content.products:`, read by @dogsbay/site-files' `productModel` (plans/product-versions-ssg.md). Undefined without the block. */
|
|
94
113
|
products?: ProductModel;
|
|
95
114
|
/** With `products`: each product's versions and default (key `""` for the unnamed source's), read through `versionsOf`. */
|
|
@@ -131,6 +150,14 @@ export interface SiteConfig {
|
|
|
131
150
|
/** Extra stylesheets, project-relative, appended after the theme. */
|
|
132
151
|
css: string[];
|
|
133
152
|
breadcrumbs: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* UI string overrides (ssg.strings): `{ key: text }` for every language, and `{ <locale>: { key: text } }`
|
|
155
|
+
* for one, which wins. Keys are those of strings.ts.
|
|
156
|
+
*/
|
|
157
|
+
strings: {
|
|
158
|
+
all: Record<string, string>;
|
|
159
|
+
byLocale: Record<string, Record<string, string>>;
|
|
160
|
+
};
|
|
134
161
|
/** Fail the build when a layout or partial reads a variable that does not exist (ssg.strictTemplates). */
|
|
135
162
|
strictTemplates: boolean;
|
|
136
163
|
/** Line under the site name in the sidebar header ("Documentation" in the Astro sites). */
|
|
@@ -181,6 +208,11 @@ export interface SiteConfig {
|
|
|
181
208
|
*/
|
|
182
209
|
dataDir: string;
|
|
183
210
|
dataDirSet: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* `content.static`: a folder served as it is at the site root (Docusaurus `static/`, Astro
|
|
213
|
+
* `public/`), shared with the Astro pipeline (site-files static-folder.ts). Project-relative.
|
|
214
|
+
*/
|
|
215
|
+
staticDir?: string;
|
|
184
216
|
/** Click-to-zoom images, from `plugins: [@dogsbay/plugin-image-zoom]` with its options. */
|
|
185
217
|
imageZoom?: {
|
|
186
218
|
background: string;
|
|
@@ -272,6 +304,8 @@ export interface RedirectDef {
|
|
|
272
304
|
}
|
|
273
305
|
export declare class ConfigError extends Error {
|
|
274
306
|
}
|
|
307
|
+
/** `versionMenu:` (links and limit), read and checked by site-files for both pipelines. */
|
|
308
|
+
export declare function versionMenuOf(raw: unknown, where: string): VersionMenu | undefined;
|
|
275
309
|
export declare function parseConfig(text: string | undefined, overrides?: Partial<SiteConfig>): SiteConfig;
|
|
276
310
|
/**
|
|
277
311
|
* The unit a site path belongs to: the one with the longest prefix that
|
|
@@ -24,6 +24,13 @@ export interface LinkTable {
|
|
|
24
24
|
* would silently turn `/1/install` (another version) into this unit's page.
|
|
25
25
|
*/
|
|
26
26
|
stripPrefixes?: string[];
|
|
27
|
+
/**
|
|
28
|
+
* `content.static`: the file a root-absolute link names in the static folder (a site path without
|
|
29
|
+
* its leading slash: `files/x.yaml`, `about/` for `about/index.html`), else undefined. Links from
|
|
30
|
+
* any unit resolve to it, relative to the page's place in the site (`unitPrefix`).
|
|
31
|
+
*/
|
|
32
|
+
staticFile?: (sitePath: string) => string | undefined;
|
|
33
|
+
unitPrefix?: string;
|
|
27
34
|
}
|
|
28
35
|
/** URL for `targetOut` as seen from the page at `fromOut`, both unit-relative files. */
|
|
29
36
|
export declare function hrefBetween(fromOut: string, targetOut: string, style: LinkStyle): string;
|
|
@@ -68,9 +68,13 @@ export interface PageModel {
|
|
|
68
68
|
updatedDatetime?: string;
|
|
69
69
|
hero?: string;
|
|
70
70
|
};
|
|
71
|
+
/** The product switcher (content.products:); none when absent. */
|
|
72
|
+
products?: R.SwitchOption[];
|
|
71
73
|
versions: R.SwitchOption[];
|
|
72
74
|
locales: R.SwitchOption[];
|
|
73
75
|
banner?: string;
|
|
76
|
+
/** The version's label, when the version has `badge: true`: "Version: <label>" above the title. */
|
|
77
|
+
versionBadge?: string;
|
|
74
78
|
editUrl?: string;
|
|
75
79
|
/** Page URL relative to the page itself, for .md mirror links. */
|
|
76
80
|
mdHref?: string;
|
|
@@ -59,6 +59,10 @@ export interface SwitchOption {
|
|
|
59
59
|
current: boolean;
|
|
60
60
|
prefix: string;
|
|
61
61
|
note?: string;
|
|
62
|
+
/** Shown but not choosable: the product switcher's "none" entry on a page outside every product. */
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/** A versionMenu link after the versions: the client goes straight to it. */
|
|
65
|
+
link?: boolean;
|
|
62
66
|
}
|
|
63
67
|
export declare function pageActions(o: {
|
|
64
68
|
mdHref: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/ssg",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.149",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Documentation static site generator for Dogsbay-MD that builds inside Cloudflare Workers and publishes sites that work offline",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,38 +49,38 @@
|
|
|
49
49
|
"tailwindcss": "^4.3.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@dogsbay/elements": "0.2.0-beta.
|
|
53
|
-
"@dogsbay/format-dogsbay-md": "0.2.0-beta.
|
|
54
|
-
"@dogsbay/format-openapi": "0.2.0-beta.
|
|
55
|
-
"@dogsbay/format-topicmap": "0.2.0-beta.
|
|
56
|
-
"@dogsbay/highlight": "0.2.0-beta.
|
|
57
|
-
"@dogsbay/minja": "0.2.0-beta.
|
|
58
|
-
"@dogsbay/primitives": "0.2.0-beta.
|
|
59
|
-
"@dogsbay/render-html": "0.2.0-beta.
|
|
60
|
-
"@dogsbay/search": "0.2.0-beta.
|
|
61
|
-
"@dogsbay/serialize-core": "0.2.0-beta.
|
|
62
|
-
"@dogsbay/site-check": "0.2.0-beta.
|
|
63
|
-
"@dogsbay/site-files": "0.2.0-beta.
|
|
64
|
-
"@dogsbay/types": "0.2.0-beta.
|
|
52
|
+
"@dogsbay/elements": "0.2.0-beta.149",
|
|
53
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.149",
|
|
54
|
+
"@dogsbay/format-openapi": "0.2.0-beta.149",
|
|
55
|
+
"@dogsbay/format-topicmap": "0.2.0-beta.149",
|
|
56
|
+
"@dogsbay/highlight": "0.2.0-beta.149",
|
|
57
|
+
"@dogsbay/minja": "0.2.0-beta.149",
|
|
58
|
+
"@dogsbay/primitives": "0.2.0-beta.149",
|
|
59
|
+
"@dogsbay/render-html": "0.2.0-beta.149",
|
|
60
|
+
"@dogsbay/search": "0.2.0-beta.149",
|
|
61
|
+
"@dogsbay/serialize-core": "0.2.0-beta.149",
|
|
62
|
+
"@dogsbay/site-check": "0.2.0-beta.149",
|
|
63
|
+
"@dogsbay/site-files": "0.2.0-beta.149",
|
|
64
|
+
"@dogsbay/types": "0.2.0-beta.149"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@axe-core/playwright": "^4.12.1",
|
|
68
68
|
"@cloudflare/workers-types": "^5.20260921.1",
|
|
69
|
-
"@dogsbay/elements": "0.2.0-beta.
|
|
70
|
-
"@dogsbay/format-dogsbay-md": "0.2.0-beta.
|
|
71
|
-
"@dogsbay/format-openapi": "0.2.0-beta.
|
|
72
|
-
"@dogsbay/format-topicmap": "0.2.0-beta.
|
|
73
|
-
"@dogsbay/highlight": "0.2.0-beta.
|
|
74
|
-
"@dogsbay/icons": "0.2.0-beta.
|
|
75
|
-
"@dogsbay/minja": "0.2.0-beta.
|
|
76
|
-
"@dogsbay/primitives": "0.2.0-beta.
|
|
77
|
-
"@dogsbay/render-html": "0.2.0-beta.
|
|
78
|
-
"@dogsbay/search": "0.2.0-beta.
|
|
79
|
-
"@dogsbay/serialize-core": "0.2.0-beta.
|
|
80
|
-
"@dogsbay/site-check": "0.2.0-beta.
|
|
81
|
-
"@dogsbay/site-files": "0.2.0-beta.
|
|
82
|
-
"@dogsbay/types": "0.2.0-beta.
|
|
83
|
-
"@dogsbay/ui": "0.2.0-beta.
|
|
69
|
+
"@dogsbay/elements": "0.2.0-beta.149",
|
|
70
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.149",
|
|
71
|
+
"@dogsbay/format-openapi": "0.2.0-beta.149",
|
|
72
|
+
"@dogsbay/format-topicmap": "0.2.0-beta.149",
|
|
73
|
+
"@dogsbay/highlight": "0.2.0-beta.149",
|
|
74
|
+
"@dogsbay/icons": "0.2.0-beta.149",
|
|
75
|
+
"@dogsbay/minja": "0.2.0-beta.149",
|
|
76
|
+
"@dogsbay/primitives": "0.2.0-beta.149",
|
|
77
|
+
"@dogsbay/render-html": "0.2.0-beta.149",
|
|
78
|
+
"@dogsbay/search": "0.2.0-beta.149",
|
|
79
|
+
"@dogsbay/serialize-core": "0.2.0-beta.149",
|
|
80
|
+
"@dogsbay/site-check": "0.2.0-beta.149",
|
|
81
|
+
"@dogsbay/site-files": "0.2.0-beta.149",
|
|
82
|
+
"@dogsbay/types": "0.2.0-beta.149",
|
|
83
|
+
"@dogsbay/ui": "0.2.0-beta.149",
|
|
84
84
|
"@mermanjs/web": "0.7.0",
|
|
85
85
|
"@playwright/test": "1.61.1",
|
|
86
86
|
"@types/node": "^22.10.0",
|